@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
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 프론트엔드 에러 표시 유틸리티
|
|
3
|
-
* Toast 알림, 에러 UI 표시 등
|
|
4
|
-
*/
|
|
5
|
-
export { getFriendlyMessage, getErrorDisplayInfo, type IErrorDisplay } from '@withwiz/core/error/friendly-messages-v2';
|
|
6
|
-
export { extractErrorInfo } from '@withwiz/core/error/extract-error-info';
|
|
7
|
-
type TLocale = 'ko' | 'en';
|
|
8
|
-
/**
|
|
9
|
-
* API 에러 응답 인터페이스
|
|
10
|
-
*/
|
|
11
|
-
export interface IApiErrorResponse {
|
|
12
|
-
success: false;
|
|
13
|
-
error: {
|
|
14
|
-
code: number;
|
|
15
|
-
message: string;
|
|
16
|
-
details?: unknown;
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* 에러 코드로 친화적 토스트 표시
|
|
21
|
-
*/
|
|
22
|
-
export declare function showFriendlyError(errorOrCode: number | IApiErrorResponse | Error, options?: {
|
|
23
|
-
locale?: TLocale;
|
|
24
|
-
duration?: number;
|
|
25
|
-
showCode?: boolean;
|
|
26
|
-
onAuthError?: () => void;
|
|
27
|
-
onRateLimitError?: () => void;
|
|
28
|
-
}): void;
|
|
29
|
-
/**
|
|
30
|
-
* API 응답에서 에러 처리
|
|
31
|
-
*/
|
|
32
|
-
export declare function handleApiResponse<T>(response: Response, options?: {
|
|
33
|
-
showToast?: boolean;
|
|
34
|
-
locale?: TLocale;
|
|
35
|
-
onAuthError?: () => void;
|
|
36
|
-
}): Promise<T>;
|
|
37
|
-
/**
|
|
38
|
-
* 에러 메시지 포맷 (인라인 표시용)
|
|
39
|
-
*/
|
|
40
|
-
export declare function formatInlineError(code: number, locale?: TLocale): string;
|
|
41
|
-
/**
|
|
42
|
-
* 에러 아이콘 가져오기
|
|
43
|
-
*/
|
|
44
|
-
export declare function getErrorIcon(code: number): string;
|
|
45
|
-
/**
|
|
46
|
-
* HTTP 상태 코드에서 기본 에러 코드 가져오기
|
|
47
|
-
*/
|
|
48
|
-
export declare function getDefaultErrorCode(status: number): number;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
formatInlineError,
|
|
3
|
-
getDefaultErrorCode,
|
|
4
|
-
getErrorIcon,
|
|
5
|
-
handleApiResponse,
|
|
6
|
-
showFriendlyError
|
|
7
|
-
} from "../../chunk-C6WH7RF5.js";
|
|
8
|
-
import "../../chunk-ATAQRXTH.js";
|
|
9
|
-
import {
|
|
10
|
-
extractErrorInfo
|
|
11
|
-
} from "../../chunk-6HQ5JHL4.js";
|
|
12
|
-
import {
|
|
13
|
-
getErrorDisplayInfo,
|
|
14
|
-
getFriendlyMessage
|
|
15
|
-
} from "../../chunk-5S7M2AJL.js";
|
|
16
|
-
import "../../chunk-7WG7XPXC.js";
|
|
17
|
-
import "../../chunk-AMZWDLJ4.js";
|
|
18
|
-
import "../../chunk-VUYS3SU7.js";
|
|
19
|
-
import "../../chunk-XQIAXMRY.js";
|
|
20
|
-
import "../../chunk-ORMEWXMH.js";
|
|
21
|
-
export {
|
|
22
|
-
extractErrorInfo,
|
|
23
|
-
formatInlineError,
|
|
24
|
-
getDefaultErrorCode,
|
|
25
|
-
getErrorDisplayInfo,
|
|
26
|
-
getErrorIcon,
|
|
27
|
-
getFriendlyMessage,
|
|
28
|
-
handleApiResponse,
|
|
29
|
-
showFriendlyError
|
|
30
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
formatInlineError,
|
|
3
|
-
getDefaultErrorCode,
|
|
4
|
-
getErrorIcon,
|
|
5
|
-
handleApiResponse,
|
|
6
|
-
showFriendlyError
|
|
7
|
-
} from "../../chunk-C6WH7RF5.js";
|
|
8
|
-
import "../../chunk-ATAQRXTH.js";
|
|
9
|
-
import {
|
|
10
|
-
extractErrorInfo
|
|
11
|
-
} from "../../chunk-6HQ5JHL4.js";
|
|
12
|
-
import {
|
|
13
|
-
getErrorDisplayInfo,
|
|
14
|
-
getFriendlyMessage
|
|
15
|
-
} from "../../chunk-5S7M2AJL.js";
|
|
16
|
-
import "../../chunk-7WG7XPXC.js";
|
|
17
|
-
import "../../chunk-AMZWDLJ4.js";
|
|
18
|
-
import "../../chunk-VUYS3SU7.js";
|
|
19
|
-
import "../../chunk-XQIAXMRY.js";
|
|
20
|
-
import "../../chunk-ORMEWXMH.js";
|
|
21
|
-
export {
|
|
22
|
-
extractErrorInfo,
|
|
23
|
-
formatInlineError,
|
|
24
|
-
getDefaultErrorCode,
|
|
25
|
-
getErrorDisplayInfo,
|
|
26
|
-
getErrorIcon,
|
|
27
|
-
getFriendlyMessage,
|
|
28
|
-
handleApiResponse,
|
|
29
|
-
showFriendlyError
|
|
30
|
-
};
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
export interface DataTableFilters {
|
|
2
|
-
search?: string;
|
|
3
|
-
[key: string]: any;
|
|
4
|
-
}
|
|
5
|
-
export interface DataTableSort {
|
|
6
|
-
sort: string;
|
|
7
|
-
order: 'asc' | 'desc';
|
|
8
|
-
}
|
|
9
|
-
export interface DataTablePagination {
|
|
10
|
-
page: number;
|
|
11
|
-
pageSize: number;
|
|
12
|
-
total: number;
|
|
13
|
-
}
|
|
14
|
-
export interface UseDataTableOptions<T> {
|
|
15
|
-
initialFilters?: DataTableFilters;
|
|
16
|
-
initialSort?: DataTableSort;
|
|
17
|
-
initialPagination?: Partial<DataTablePagination>;
|
|
18
|
-
debounceMs?: number;
|
|
19
|
-
onDataChange?: (params: {
|
|
20
|
-
filters: DataTableFilters;
|
|
21
|
-
sort: DataTableSort;
|
|
22
|
-
pagination: DataTablePagination;
|
|
23
|
-
}) => Promise<void>;
|
|
24
|
-
}
|
|
25
|
-
export interface UseDataTableState<T> {
|
|
26
|
-
data: T[];
|
|
27
|
-
loading: boolean;
|
|
28
|
-
error: string | null;
|
|
29
|
-
total: number;
|
|
30
|
-
filters: DataTableFilters;
|
|
31
|
-
sort: DataTableSort;
|
|
32
|
-
pagination: DataTablePagination;
|
|
33
|
-
selectedIds: string[];
|
|
34
|
-
}
|
|
35
|
-
export interface UseDataTableDataActions<T> {
|
|
36
|
-
setData: (data: T[]) => void;
|
|
37
|
-
setLoading: (loading: boolean) => void;
|
|
38
|
-
setError: (error: string | null) => void;
|
|
39
|
-
setTotal: (total: number) => void;
|
|
40
|
-
}
|
|
41
|
-
export interface UseDataTableFilterActions {
|
|
42
|
-
setFilters: (filters: DataTableFilters) => void;
|
|
43
|
-
updateFilter: (key: string, value: any) => void;
|
|
44
|
-
clearFilters: () => void;
|
|
45
|
-
}
|
|
46
|
-
export interface UseDataTableSortActions {
|
|
47
|
-
setSort: (sort: string, order?: 'asc' | 'desc') => void;
|
|
48
|
-
}
|
|
49
|
-
export interface UseDataTablePaginationActions {
|
|
50
|
-
setPage: (page: number) => void;
|
|
51
|
-
setPageSize: (pageSize: number) => void;
|
|
52
|
-
}
|
|
53
|
-
export interface UseDataTableSelectionActions {
|
|
54
|
-
setSelectedIds: (ids: string[]) => void;
|
|
55
|
-
toggleSelection: (id: string) => void;
|
|
56
|
-
selectAll: () => void;
|
|
57
|
-
clearSelection: () => void;
|
|
58
|
-
}
|
|
59
|
-
export interface UseDataTableActions {
|
|
60
|
-
refresh: () => Promise<void>;
|
|
61
|
-
bulkAction: (action: (ids: string[]) => Promise<void>) => Promise<void>;
|
|
62
|
-
}
|
|
63
|
-
export interface UseDataTableReturn<T> {
|
|
64
|
-
data: T[];
|
|
65
|
-
loading: boolean;
|
|
66
|
-
error: string | null;
|
|
67
|
-
total: number;
|
|
68
|
-
filters: DataTableFilters;
|
|
69
|
-
sort: DataTableSort;
|
|
70
|
-
pagination: DataTablePagination;
|
|
71
|
-
selectedIds: string[];
|
|
72
|
-
setData: (data: T[]) => void;
|
|
73
|
-
setLoading: (loading: boolean) => void;
|
|
74
|
-
setError: (error: string | null) => void;
|
|
75
|
-
setTotal: (total: number) => void;
|
|
76
|
-
setFilters: (filters: DataTableFilters) => void;
|
|
77
|
-
updateFilter: (key: string, value: any) => void;
|
|
78
|
-
clearFilters: () => void;
|
|
79
|
-
setSort: (sort: string, order?: 'asc' | 'desc') => void;
|
|
80
|
-
setPage: (page: number) => void;
|
|
81
|
-
setPageSize: (pageSize: number) => void;
|
|
82
|
-
setSelectedIds: (ids: string[]) => void;
|
|
83
|
-
toggleSelection: (id: string) => void;
|
|
84
|
-
selectAll: () => void;
|
|
85
|
-
clearSelection: () => void;
|
|
86
|
-
refresh: () => Promise<void>;
|
|
87
|
-
bulkAction: (action: (ids: string[]) => Promise<void>) => Promise<void>;
|
|
88
|
-
state: UseDataTableState<T>;
|
|
89
|
-
dataActions: UseDataTableDataActions<T>;
|
|
90
|
-
filterActions: UseDataTableFilterActions;
|
|
91
|
-
sortActions: UseDataTableSortActions;
|
|
92
|
-
paginationActions: UseDataTablePaginationActions;
|
|
93
|
-
selectionActions: UseDataTableSelectionActions;
|
|
94
|
-
actions: UseDataTableActions;
|
|
95
|
-
}
|
|
96
|
-
export declare function useDataTable<T>({ initialFilters, initialSort, initialPagination, debounceMs, onDataChange, }: UseDataTableOptions<T>): UseDataTableReturn<T>;
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
useDebounce
|
|
4
|
-
} from "../../chunk-7EXSMZ2O.js";
|
|
5
|
-
import {
|
|
6
|
-
__spreadProps,
|
|
7
|
-
__spreadValues
|
|
8
|
-
} from "../../chunk-ORMEWXMH.js";
|
|
9
|
-
|
|
10
|
-
// src/react/hooks/useDataTable.ts
|
|
11
|
-
import { useState, useCallback, useEffect } from "react";
|
|
12
|
-
function useDataTable({
|
|
13
|
-
initialFilters = {},
|
|
14
|
-
initialSort = { sort: "createdAt", order: "desc" },
|
|
15
|
-
initialPagination = { page: 1, pageSize: 10, total: 0 },
|
|
16
|
-
debounceMs = 500,
|
|
17
|
-
onDataChange
|
|
18
|
-
}) {
|
|
19
|
-
const [data, setData] = useState([]);
|
|
20
|
-
const [loading, setLoading] = useState(false);
|
|
21
|
-
const [error, setError] = useState(null);
|
|
22
|
-
const [total, setTotal] = useState(initialPagination.total || 0);
|
|
23
|
-
const [filters, setFilters] = useState(initialFilters);
|
|
24
|
-
const [sort, setSortState] = useState(initialSort);
|
|
25
|
-
const [pagination, setPaginationState] = useState({
|
|
26
|
-
page: initialPagination.page || 1,
|
|
27
|
-
pageSize: initialPagination.pageSize || 10,
|
|
28
|
-
total: initialPagination.total || 0
|
|
29
|
-
});
|
|
30
|
-
const [selectedIds, setSelectedIds] = useState([]);
|
|
31
|
-
const debouncedSearch = useDebounce(filters.search || "", debounceMs);
|
|
32
|
-
const refresh = useCallback(async () => {
|
|
33
|
-
if (!onDataChange) return;
|
|
34
|
-
setLoading(true);
|
|
35
|
-
setError(null);
|
|
36
|
-
try {
|
|
37
|
-
await onDataChange({
|
|
38
|
-
filters: __spreadProps(__spreadValues({}, filters), { search: debouncedSearch }),
|
|
39
|
-
sort,
|
|
40
|
-
pagination
|
|
41
|
-
});
|
|
42
|
-
} catch (err) {
|
|
43
|
-
setError(err instanceof Error ? err.message : "An error occurred");
|
|
44
|
-
} finally {
|
|
45
|
-
setLoading(false);
|
|
46
|
-
}
|
|
47
|
-
}, [filters, debouncedSearch, sort, pagination, onDataChange]);
|
|
48
|
-
const updateFilter = useCallback((key, value) => {
|
|
49
|
-
setFilters((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
50
|
-
[key]: value
|
|
51
|
-
}));
|
|
52
|
-
if (key !== "search") {
|
|
53
|
-
setPaginationState((prev) => __spreadProps(__spreadValues({}, prev), { page: 1 }));
|
|
54
|
-
}
|
|
55
|
-
}, []);
|
|
56
|
-
const clearFilters = useCallback(() => {
|
|
57
|
-
setFilters(initialFilters);
|
|
58
|
-
setPaginationState((prev) => __spreadProps(__spreadValues({}, prev), { page: 1 }));
|
|
59
|
-
}, [initialFilters]);
|
|
60
|
-
const setSort = useCallback((newSort, newOrder) => {
|
|
61
|
-
setSortState((prev) => {
|
|
62
|
-
if (prev.sort === newSort) {
|
|
63
|
-
return {
|
|
64
|
-
sort: newSort,
|
|
65
|
-
order: newOrder || (prev.order === "asc" ? "desc" : "asc")
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
return {
|
|
69
|
-
sort: newSort,
|
|
70
|
-
order: newOrder || "asc"
|
|
71
|
-
};
|
|
72
|
-
});
|
|
73
|
-
setPaginationState((prev) => __spreadProps(__spreadValues({}, prev), { page: 1 }));
|
|
74
|
-
}, []);
|
|
75
|
-
const setPage = useCallback((page) => {
|
|
76
|
-
setPaginationState((prev) => __spreadProps(__spreadValues({}, prev), { page }));
|
|
77
|
-
}, []);
|
|
78
|
-
const setPageSize = useCallback((pageSize) => {
|
|
79
|
-
setPaginationState((prev) => __spreadProps(__spreadValues({}, prev), { pageSize, page: 1 }));
|
|
80
|
-
}, []);
|
|
81
|
-
const toggleSelection = useCallback((id) => {
|
|
82
|
-
setSelectedIds(
|
|
83
|
-
(prev) => prev.includes(id) ? prev.filter((selectedId) => selectedId !== id) : [...prev, id]
|
|
84
|
-
);
|
|
85
|
-
}, []);
|
|
86
|
-
const selectAll = useCallback(() => {
|
|
87
|
-
setSelectedIds(data.map((item) => item.id));
|
|
88
|
-
}, [data]);
|
|
89
|
-
const clearSelection = useCallback(() => {
|
|
90
|
-
setSelectedIds([]);
|
|
91
|
-
}, []);
|
|
92
|
-
const bulkAction = useCallback(async (action) => {
|
|
93
|
-
if (selectedIds.length === 0) return;
|
|
94
|
-
setLoading(true);
|
|
95
|
-
try {
|
|
96
|
-
await action(selectedIds);
|
|
97
|
-
setSelectedIds([]);
|
|
98
|
-
await refresh();
|
|
99
|
-
} catch (err) {
|
|
100
|
-
setError(err instanceof Error ? err.message : "Bulk action failed");
|
|
101
|
-
} finally {
|
|
102
|
-
setLoading(false);
|
|
103
|
-
}
|
|
104
|
-
}, [selectedIds, refresh]);
|
|
105
|
-
useEffect(() => {
|
|
106
|
-
if (debouncedSearch !== filters.search) {
|
|
107
|
-
setPaginationState((prev) => __spreadProps(__spreadValues({}, prev), { page: 1 }));
|
|
108
|
-
}
|
|
109
|
-
}, [debouncedSearch, filters.search]);
|
|
110
|
-
useEffect(() => {
|
|
111
|
-
refresh();
|
|
112
|
-
}, [debouncedSearch, sort.sort, sort.order, pagination.page, pagination.pageSize]);
|
|
113
|
-
return {
|
|
114
|
-
// 기존 flat 리턴 (하위 호환)
|
|
115
|
-
data,
|
|
116
|
-
loading,
|
|
117
|
-
error,
|
|
118
|
-
total,
|
|
119
|
-
filters,
|
|
120
|
-
sort,
|
|
121
|
-
pagination,
|
|
122
|
-
selectedIds,
|
|
123
|
-
setData,
|
|
124
|
-
setLoading,
|
|
125
|
-
setError,
|
|
126
|
-
setTotal,
|
|
127
|
-
setFilters,
|
|
128
|
-
updateFilter,
|
|
129
|
-
clearFilters,
|
|
130
|
-
setSort,
|
|
131
|
-
setPage,
|
|
132
|
-
setPageSize,
|
|
133
|
-
setSelectedIds,
|
|
134
|
-
toggleSelection,
|
|
135
|
-
selectAll,
|
|
136
|
-
clearSelection,
|
|
137
|
-
refresh,
|
|
138
|
-
bulkAction,
|
|
139
|
-
// 새 그룹화 리턴
|
|
140
|
-
state: { data, loading, error, total, filters, sort, pagination, selectedIds },
|
|
141
|
-
dataActions: { setData, setLoading, setError, setTotal },
|
|
142
|
-
filterActions: { setFilters, updateFilter, clearFilters },
|
|
143
|
-
sortActions: { setSort },
|
|
144
|
-
paginationActions: { setPage, setPageSize },
|
|
145
|
-
selectionActions: { setSelectedIds, toggleSelection, selectAll, clearSelection },
|
|
146
|
-
actions: { refresh, bulkAction }
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
export {
|
|
150
|
-
useDataTable
|
|
151
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export interface UseExitIntentOptions {
|
|
2
|
-
/** 팝업 표시 쿨다운 시간 (밀리초) - 기본 24시간 */
|
|
3
|
-
cooldown?: number;
|
|
4
|
-
/** 페이지 진입 후 대기 시간 (밀리초) - 기본 5초 */
|
|
5
|
-
delay?: number;
|
|
6
|
-
/** localStorage에 저장할 키 */
|
|
7
|
-
storageKey?: string;
|
|
8
|
-
/** 비활성화 여부 */
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export interface UseExitIntentReturn {
|
|
12
|
-
/** 팝업 표시 여부 */
|
|
13
|
-
showPopup: boolean;
|
|
14
|
-
/** 팝업 닫기 */
|
|
15
|
-
closePopup: () => void;
|
|
16
|
-
/** 다시 보지 않기 처리 */
|
|
17
|
-
dismissForever: () => void;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Exit Intent 감지 훅
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* ```tsx
|
|
24
|
-
* const { showPopup, closePopup, dismissForever } = useExitIntent({
|
|
25
|
-
* cooldown: 86400000, // 24시간
|
|
26
|
-
* delay: 5000, // 5초 후 활성화
|
|
27
|
-
* storageKey: 'my-popup',
|
|
28
|
-
* });
|
|
29
|
-
*
|
|
30
|
-
* if (showPopup) {
|
|
31
|
-
* return <Modal onClose={closePopup} onDismiss={dismissForever} />;
|
|
32
|
-
* }
|
|
33
|
-
* ```
|
|
34
|
-
*/
|
|
35
|
-
export declare function useExitIntent(options?: UseExitIntentOptions): UseExitIntentReturn;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "../../chunk-ORMEWXMH.js";
|
|
3
|
-
|
|
4
|
-
// src/react/hooks/useExitIntent.ts
|
|
5
|
-
import { useState, useEffect, useCallback, useRef } from "react";
|
|
6
|
-
var DEFAULT_COOLDOWN = 24 * 60 * 60 * 1e3;
|
|
7
|
-
var DEFAULT_DELAY = 5e3;
|
|
8
|
-
var DEFAULT_STORAGE_KEY = "exit-intent-popup";
|
|
9
|
-
function useExitIntent(options = {}) {
|
|
10
|
-
const {
|
|
11
|
-
cooldown = DEFAULT_COOLDOWN,
|
|
12
|
-
delay = DEFAULT_DELAY,
|
|
13
|
-
storageKey = DEFAULT_STORAGE_KEY,
|
|
14
|
-
disabled = false
|
|
15
|
-
} = options;
|
|
16
|
-
const [showPopup, setShowPopup] = useState(false);
|
|
17
|
-
const hasTriggered = useRef(false);
|
|
18
|
-
const isReady = useRef(false);
|
|
19
|
-
const canShowPopup = useCallback(() => {
|
|
20
|
-
if (typeof window === "undefined") return false;
|
|
21
|
-
const lastShown = localStorage.getItem(`${storageKey}-last-shown`);
|
|
22
|
-
const isDismissed = localStorage.getItem(`${storageKey}-dismissed`) === "true";
|
|
23
|
-
if (isDismissed) return false;
|
|
24
|
-
if (!lastShown) return true;
|
|
25
|
-
const timeSinceLastShown = Date.now() - parseInt(lastShown, 10);
|
|
26
|
-
return timeSinceLastShown >= cooldown;
|
|
27
|
-
}, [storageKey, cooldown]);
|
|
28
|
-
const triggerPopup = useCallback(() => {
|
|
29
|
-
if (hasTriggered.current || !isReady.current || disabled) return;
|
|
30
|
-
if (!canShowPopup()) return;
|
|
31
|
-
hasTriggered.current = true;
|
|
32
|
-
setShowPopup(true);
|
|
33
|
-
localStorage.setItem(`${storageKey}-last-shown`, Date.now().toString());
|
|
34
|
-
}, [canShowPopup, storageKey, disabled]);
|
|
35
|
-
const closePopup = useCallback(() => {
|
|
36
|
-
setShowPopup(false);
|
|
37
|
-
}, []);
|
|
38
|
-
const dismissForever = useCallback(() => {
|
|
39
|
-
localStorage.setItem(`${storageKey}-dismissed`, "true");
|
|
40
|
-
setShowPopup(false);
|
|
41
|
-
}, [storageKey]);
|
|
42
|
-
useEffect(() => {
|
|
43
|
-
if (disabled) return;
|
|
44
|
-
const delayTimer = setTimeout(() => {
|
|
45
|
-
isReady.current = true;
|
|
46
|
-
}, delay);
|
|
47
|
-
const handleMouseLeave = (e) => {
|
|
48
|
-
if (e.clientY < 10 && isReady.current) {
|
|
49
|
-
triggerPopup();
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
const handleVisibilityChange = () => {
|
|
53
|
-
if (document.visibilityState === "hidden" && isReady.current) {
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
document.addEventListener("mouseleave", handleMouseLeave);
|
|
57
|
-
document.addEventListener("visibilitychange", handleVisibilityChange);
|
|
58
|
-
return () => {
|
|
59
|
-
clearTimeout(delayTimer);
|
|
60
|
-
document.removeEventListener("mouseleave", handleMouseLeave);
|
|
61
|
-
document.removeEventListener("visibilitychange", handleVisibilityChange);
|
|
62
|
-
};
|
|
63
|
-
}, [delay, disabled, triggerPopup]);
|
|
64
|
-
return {
|
|
65
|
-
showPopup,
|
|
66
|
-
closePopup,
|
|
67
|
-
dismissForever
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
export {
|
|
71
|
-
useExitIntent
|
|
72
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 사용자 타임존 정보를 관리하는 Hook
|
|
3
|
-
*/
|
|
4
|
-
export declare function useTimezone(): {
|
|
5
|
-
isLoading: boolean;
|
|
6
|
-
refreshTimezone: () => void;
|
|
7
|
-
timezone: string;
|
|
8
|
-
offset: number;
|
|
9
|
-
offsetFormatted: string;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* 타임존 정보를 간단하게 표시하는 Hook
|
|
13
|
-
*/
|
|
14
|
-
export declare function useSimpleTimezone(): {
|
|
15
|
-
timezone: string;
|
|
16
|
-
offsetFormatted: string;
|
|
17
|
-
isLoading: boolean;
|
|
18
|
-
display: string;
|
|
19
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { IQRCodeSettings, IQRCodeDownloadOptions } from '@withwiz/core/types/qr-code';
|
|
2
|
-
export declare const DEFAULT_QR_SETTINGS: IQRCodeSettings;
|
|
3
|
-
export declare const applyUserBrandToQRSettings: (settings: IQRCodeSettings, userBrand?: {
|
|
4
|
-
brandColor?: string;
|
|
5
|
-
brandLogoUrl?: string;
|
|
6
|
-
}) => IQRCodeSettings;
|
|
7
|
-
export declare const QR_CODE_TEMPLATES: Array<{
|
|
8
|
-
id: string;
|
|
9
|
-
name: string;
|
|
10
|
-
settings: IQRCodeSettings;
|
|
11
|
-
}>;
|
|
12
|
-
export declare const downloadQRCode: (svgElement: SVGElement, options: IQRCodeDownloadOptions) => Promise<void>;
|
|
13
|
-
export declare const generateQRCodeUrl: (shortCode: string, baseUrl: string) => string;
|
|
14
|
-
export declare const downloadQRCodeWithLogo: (svgElement: SVGElement, logoDataUrl: string, options: IQRCodeDownloadOptions) => Promise<void>;
|
|
15
|
-
export declare const loadQRSettings: () => IQRCodeSettings;
|
|
16
|
-
export declare const saveQRSettings: (settings: IQRCodeSettings) => void;
|