@nocios/crudify-components 2.0.81 → 2.0.88
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.md +21 -0
- package/dist/api-jcCTCqPD.d.mts +61 -0
- package/dist/api-jcCTCqPD.d.ts +61 -0
- package/dist/chunk-4I767MRM.mjs +142 -0
- package/dist/chunk-5V5ILPP3.js +1 -0
- package/dist/chunk-BJEDX2HU.js +142 -0
- package/dist/chunk-GZOB4JDB.js +1 -0
- package/dist/chunk-ODKXUEH5.js +1 -0
- package/dist/chunk-U335FNUD.mjs +1 -0
- package/dist/chunk-YRU7AXYV.mjs +1 -0
- package/dist/chunk-Z75DRSTN.mjs +1 -0
- package/dist/{errorTranslation-BEWwDbCH.d.ts → errorTranslation-BdqG-dXD.d.ts} +97 -26
- package/dist/{errorTranslation-DsGZon0M.d.mts → errorTranslation-BxJmBGx0.d.mts} +97 -26
- package/dist/hooks.d.mts +3 -4
- package/dist/hooks.d.ts +3 -4
- package/dist/hooks.js +1 -1
- package/dist/hooks.mjs +1 -1
- package/dist/{index-ZcF6nJt4.d.mts → index-Cx9P3ZCG.d.mts} +96 -27
- package/dist/{index-Dnmttf62.d.ts → index-rHtWMls-.d.ts} +96 -27
- package/dist/index.d.mts +366 -118
- package/dist/index.d.ts +366 -118
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/public-policies.d.mts +7 -0
- package/dist/public-policies.d.ts +7 -0
- package/dist/public-policies.js +1 -0
- package/dist/public-policies.mjs +1 -0
- package/dist/utils.d.mts +71 -3
- package/dist/utils.d.ts +71 -3
- package/dist/utils.js +1 -1
- package/dist/utils.mjs +1 -1
- package/package.json +44 -42
- package/.github/workflows/ci.yml +0 -70
- package/.husky/pre-commit +0 -26
- package/.husky/pre-push +0 -30
- package/.nvmrc +0 -1
- package/.prettierignore +0 -18
- package/.prettierrc +0 -9
- package/.scannerwork/.sonar_lock +0 -0
- package/.scannerwork/report-task.txt +0 -6
- package/README_DEPTH.md +0 -1237
- package/coverage/base.css +0 -224
- package/coverage/block-navigation.js +0 -87
- package/coverage/components/CrudiaAutoGenerate.tsx.html +0 -616
- package/coverage/components/CrudiaFileField/CrudiaFileField.tsx.html +0 -1312
- package/coverage/components/CrudiaFileField/components/DeleteConfirmationDialog.tsx.html +0 -355
- package/coverage/components/CrudiaFileField/components/DropZone.tsx.html +0 -523
- package/coverage/components/CrudiaFileField/components/FileItemRow.tsx.html +0 -835
- package/coverage/components/CrudiaFileField/components/FileThumbnail.tsx.html +0 -1585
- package/coverage/components/CrudiaFileField/components/index.html +0 -176
- package/coverage/components/CrudiaFileField/components/index.ts.html +0 -115
- package/coverage/components/CrudiaFileField/hooks/index.html +0 -146
- package/coverage/components/CrudiaFileField/hooks/index.ts.html +0 -112
- package/coverage/components/CrudiaFileField/hooks/useDeleteConfirmation.ts.html +0 -433
- package/coverage/components/CrudiaFileField/hooks/useDragDrop.ts.html +0 -409
- package/coverage/components/CrudiaFileField/index.html +0 -131
- package/coverage/components/CrudiaFileField/index.ts.html +0 -112
- package/coverage/components/CrudiaFileField/utils/formatters.ts.html +0 -169
- package/coverage/components/CrudiaFileField/utils/icons.tsx.html +0 -253
- package/coverage/components/CrudiaFileField/utils/index.html +0 -146
- package/coverage/components/CrudiaFileField/utils/index.ts.html +0 -103
- package/coverage/components/CrudiaMarkdownField.tsx.html +0 -676
- package/coverage/components/CrudifyInitializer.tsx.html +0 -712
- package/coverage/components/CrudifyLogin/Forms/CheckCodeForm.tsx.html +0 -640
- package/coverage/components/CrudifyLogin/Forms/ForgotPasswordForm.tsx.html +0 -730
- package/coverage/components/CrudifyLogin/Forms/LoginForm.tsx.html +0 -892
- package/coverage/components/CrudifyLogin/Forms/ResetPasswordForm.tsx.html +0 -1219
- package/coverage/components/CrudifyLogin/Forms/components/CodeInput.tsx.html +0 -289
- package/coverage/components/CrudifyLogin/Forms/components/FormAlert.tsx.html +0 -202
- package/coverage/components/CrudifyLogin/Forms/components/PasswordInput.tsx.html +0 -346
- package/coverage/components/CrudifyLogin/Forms/components/index.html +0 -161
- package/coverage/components/CrudifyLogin/Forms/components/index.ts.html +0 -106
- package/coverage/components/CrudifyLogin/Forms/index.html +0 -176
- package/coverage/components/CrudifyLogin/Forms/index.ts.html +0 -145
- package/coverage/components/CrudifyLogin/Forms/utils/errorTranslation.ts.html +0 -268
- package/coverage/components/CrudifyLogin/Forms/utils/index.html +0 -161
- package/coverage/components/CrudifyLogin/Forms/utils/index.ts.html +0 -121
- package/coverage/components/CrudifyLogin/Forms/utils/paramUtils.ts.html +0 -496
- package/coverage/components/CrudifyLogin/Forms/utils/validation.ts.html +0 -307
- package/coverage/components/CrudifyLogin/components/CrudifyInitializer.tsx.html +0 -268
- package/coverage/components/CrudifyLogin/components/index.html +0 -116
- package/coverage/components/CrudifyLogin/context/CrudifyProvider.tsx.html +0 -409
- package/coverage/components/CrudifyLogin/context/I18nProvider.tsx.html +0 -430
- package/coverage/components/CrudifyLogin/context/LoginStateProvider.tsx.html +0 -1261
- package/coverage/components/CrudifyLogin/context/index.html +0 -161
- package/coverage/components/CrudifyLogin/context/index.ts.html +0 -91
- package/coverage/components/CrudifyLogin/hooks/index.html +0 -131
- package/coverage/components/CrudifyLogin/hooks/useCrudifyLogin.ts.html +0 -463
- package/coverage/components/CrudifyLogin/hooks/useTranslationsFromUrl.ts.html +0 -391
- package/coverage/components/CrudifyLogin/index.html +0 -116
- package/coverage/components/CrudifyLogin/index.tsx.html +0 -466
- package/coverage/components/CrudifyLogin/utils/index.html +0 -116
- package/coverage/components/CrudifyLogin/utils/secureStorage.ts.html +0 -859
- package/coverage/components/GlobalNotificationProvider.tsx.html +0 -844
- package/coverage/components/LoginComponent.tsx.html +0 -676
- package/coverage/components/PasswordRequirements/index.html +0 -116
- package/coverage/components/PasswordRequirements/index.tsx.html +0 -232
- package/coverage/components/PublicPolicies/FieldSelector/FieldSelector.tsx.html +0 -1078
- package/coverage/components/PublicPolicies/FieldSelector/index.html +0 -131
- package/coverage/components/PublicPolicies/FieldSelector/index.ts.html +0 -88
- package/coverage/components/PublicPolicies/Policies.tsx.html +0 -625
- package/coverage/components/PublicPolicies/PolicyItem/PolicyItem.tsx.html +0 -886
- package/coverage/components/PublicPolicies/PolicyItem/index.html +0 -131
- package/coverage/components/PublicPolicies/PolicyItem/index.ts.html +0 -88
- package/coverage/components/PublicPolicies/constants.ts.html +0 -106
- package/coverage/components/PublicPolicies/index.html +0 -146
- package/coverage/components/PublicPolicies/index.ts.html +0 -88
- package/coverage/components/Routing/AuthRoute.tsx.html +0 -382
- package/coverage/components/Routing/GuestRoute.tsx.html +0 -352
- package/coverage/components/Routing/ProtectedRoute.tsx.html +0 -316
- package/coverage/components/Routing/index.html +0 -161
- package/coverage/components/Routing/index.ts.html +0 -109
- package/coverage/components/SessionLoadingScreen/index.html +0 -116
- package/coverage/components/SessionLoadingScreen/index.tsx.html +0 -379
- package/coverage/components/SessionTimeIndicator/index.html +0 -116
- package/coverage/components/SessionTimeIndicator/index.tsx.html +0 -523
- package/coverage/components/UserProfile/UserProfileDisplay.tsx.html +0 -931
- package/coverage/components/UserProfile/index.html +0 -131
- package/coverage/components/UserProfile/index.ts.html +0 -88
- package/coverage/components/index.html +0 -191
- package/coverage/components/index.ts.html +0 -178
- package/coverage/core/CrossTabSyncManager.ts.html +0 -853
- package/coverage/core/CrudifyInitializationManager.ts.html +0 -1279
- package/coverage/core/SessionManager.ts.html +0 -3064
- package/coverage/core/index.html +0 -146
- package/coverage/coverage-final.json +0 -117
- package/coverage/favicon.png +0 -0
- package/coverage/hooks/index.html +0 -191
- package/coverage/hooks/index.ts.html +0 -136
- package/coverage/hooks/useAuth.ts.html +0 -529
- package/coverage/hooks/useAutoGenerate.ts.html +0 -571
- package/coverage/hooks/useCrudifyWithNotifications/constants.ts.html +0 -247
- package/coverage/hooks/useCrudifyWithNotifications/hooks/index.html +0 -116
- package/coverage/hooks/useCrudifyWithNotifications/hooks/useCrudOperations.ts.html +0 -820
- package/coverage/hooks/useCrudifyWithNotifications/index.html +0 -146
- package/coverage/hooks/useCrudifyWithNotifications/index.ts.html +0 -118
- package/coverage/hooks/useCrudifyWithNotifications/useCrudifyWithNotifications.ts.html +0 -565
- package/coverage/hooks/useCrudifyWithNotifications/utils/errorMessageResolver.ts.html +0 -847
- package/coverage/hooks/useCrudifyWithNotifications/utils/index.html +0 -146
- package/coverage/hooks/useCrudifyWithNotifications/utils/notificationFilters.ts.html +0 -313
- package/coverage/hooks/useCrudifyWithNotifications/utils/successMessageResolver.ts.html +0 -265
- package/coverage/hooks/useData.ts.html +0 -829
- package/coverage/hooks/useFileUpload/index.html +0 -131
- package/coverage/hooks/useFileUpload/index.ts.html +0 -112
- package/coverage/hooks/useFileUpload/services/index.html +0 -131
- package/coverage/hooks/useFileUpload/services/index.ts.html +0 -106
- package/coverage/hooks/useFileUpload/services/uploadService.ts.html +0 -610
- package/coverage/hooks/useFileUpload/useFileUpload.ts.html +0 -2092
- package/coverage/hooks/useFileUpload/utils/fileUtils.ts.html +0 -271
- package/coverage/hooks/useFileUpload/utils/index.html +0 -161
- package/coverage/hooks/useFileUpload/utils/index.ts.html +0 -109
- package/coverage/hooks/useFileUpload/utils/mimeTypes.ts.html +0 -235
- package/coverage/hooks/useFileUpload/utils/validation.ts.html +0 -403
- package/coverage/hooks/useSession/constants.ts.html +0 -217
- package/coverage/hooks/useSession/hooks/index.html +0 -176
- package/coverage/hooks/useSession/hooks/useAuthEventSubscriber.ts.html +0 -331
- package/coverage/hooks/useSession/hooks/useCrossTabSync.ts.html +0 -535
- package/coverage/hooks/useSession/hooks/useSessionActions.ts.html +0 -664
- package/coverage/hooks/useSession/hooks/useSessionState.ts.html +0 -295
- package/coverage/hooks/useSession/hooks/useTokenRefreshScheduler.ts.html +0 -535
- package/coverage/hooks/useSession/index.html +0 -161
- package/coverage/hooks/useSession/index.ts.html +0 -127
- package/coverage/hooks/useSession/types.ts.html +0 -427
- package/coverage/hooks/useSession/useSession.ts.html +0 -526
- package/coverage/hooks/useSession/utils/index.html +0 -131
- package/coverage/hooks/useSession/utils/initializeSession.ts.html +0 -424
- package/coverage/hooks/useSession/utils/tokenUtils.ts.html +0 -298
- package/coverage/hooks/useUserData.ts.html +0 -1210
- package/coverage/hooks/useUserProfile.ts.html +0 -820
- package/coverage/index.html +0 -656
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/components/CrudiaAutoGenerate.tsx.html +0 -616
- package/coverage/lcov-report/components/CrudiaFileField/CrudiaFileField.tsx.html +0 -1312
- package/coverage/lcov-report/components/CrudiaFileField/components/DeleteConfirmationDialog.tsx.html +0 -355
- package/coverage/lcov-report/components/CrudiaFileField/components/DropZone.tsx.html +0 -523
- package/coverage/lcov-report/components/CrudiaFileField/components/FileItemRow.tsx.html +0 -835
- package/coverage/lcov-report/components/CrudiaFileField/components/FileThumbnail.tsx.html +0 -1585
- package/coverage/lcov-report/components/CrudiaFileField/components/index.html +0 -176
- package/coverage/lcov-report/components/CrudiaFileField/components/index.ts.html +0 -115
- package/coverage/lcov-report/components/CrudiaFileField/hooks/index.html +0 -146
- package/coverage/lcov-report/components/CrudiaFileField/hooks/index.ts.html +0 -112
- package/coverage/lcov-report/components/CrudiaFileField/hooks/useDeleteConfirmation.ts.html +0 -433
- package/coverage/lcov-report/components/CrudiaFileField/hooks/useDragDrop.ts.html +0 -409
- package/coverage/lcov-report/components/CrudiaFileField/index.html +0 -131
- package/coverage/lcov-report/components/CrudiaFileField/index.ts.html +0 -112
- package/coverage/lcov-report/components/CrudiaFileField/utils/formatters.ts.html +0 -169
- package/coverage/lcov-report/components/CrudiaFileField/utils/icons.tsx.html +0 -253
- package/coverage/lcov-report/components/CrudiaFileField/utils/index.html +0 -146
- package/coverage/lcov-report/components/CrudiaFileField/utils/index.ts.html +0 -103
- package/coverage/lcov-report/components/CrudiaMarkdownField.tsx.html +0 -676
- package/coverage/lcov-report/components/CrudifyInitializer.tsx.html +0 -712
- package/coverage/lcov-report/components/CrudifyLogin/Forms/CheckCodeForm.tsx.html +0 -640
- package/coverage/lcov-report/components/CrudifyLogin/Forms/ForgotPasswordForm.tsx.html +0 -730
- package/coverage/lcov-report/components/CrudifyLogin/Forms/LoginForm.tsx.html +0 -892
- package/coverage/lcov-report/components/CrudifyLogin/Forms/ResetPasswordForm.tsx.html +0 -1219
- package/coverage/lcov-report/components/CrudifyLogin/Forms/components/CodeInput.tsx.html +0 -289
- package/coverage/lcov-report/components/CrudifyLogin/Forms/components/FormAlert.tsx.html +0 -202
- package/coverage/lcov-report/components/CrudifyLogin/Forms/components/PasswordInput.tsx.html +0 -346
- package/coverage/lcov-report/components/CrudifyLogin/Forms/components/index.html +0 -161
- package/coverage/lcov-report/components/CrudifyLogin/Forms/components/index.ts.html +0 -106
- package/coverage/lcov-report/components/CrudifyLogin/Forms/index.html +0 -176
- package/coverage/lcov-report/components/CrudifyLogin/Forms/index.ts.html +0 -145
- package/coverage/lcov-report/components/CrudifyLogin/Forms/utils/errorTranslation.ts.html +0 -268
- package/coverage/lcov-report/components/CrudifyLogin/Forms/utils/index.html +0 -161
- package/coverage/lcov-report/components/CrudifyLogin/Forms/utils/index.ts.html +0 -121
- package/coverage/lcov-report/components/CrudifyLogin/Forms/utils/paramUtils.ts.html +0 -496
- package/coverage/lcov-report/components/CrudifyLogin/Forms/utils/validation.ts.html +0 -307
- package/coverage/lcov-report/components/CrudifyLogin/components/CrudifyInitializer.tsx.html +0 -268
- package/coverage/lcov-report/components/CrudifyLogin/components/index.html +0 -116
- package/coverage/lcov-report/components/CrudifyLogin/context/CrudifyProvider.tsx.html +0 -409
- package/coverage/lcov-report/components/CrudifyLogin/context/I18nProvider.tsx.html +0 -430
- package/coverage/lcov-report/components/CrudifyLogin/context/LoginStateProvider.tsx.html +0 -1261
- package/coverage/lcov-report/components/CrudifyLogin/context/index.html +0 -161
- package/coverage/lcov-report/components/CrudifyLogin/context/index.ts.html +0 -91
- package/coverage/lcov-report/components/CrudifyLogin/hooks/index.html +0 -131
- package/coverage/lcov-report/components/CrudifyLogin/hooks/useCrudifyLogin.ts.html +0 -463
- package/coverage/lcov-report/components/CrudifyLogin/hooks/useTranslationsFromUrl.ts.html +0 -391
- package/coverage/lcov-report/components/CrudifyLogin/index.html +0 -116
- package/coverage/lcov-report/components/CrudifyLogin/index.tsx.html +0 -466
- package/coverage/lcov-report/components/CrudifyLogin/utils/index.html +0 -116
- package/coverage/lcov-report/components/CrudifyLogin/utils/secureStorage.ts.html +0 -859
- package/coverage/lcov-report/components/GlobalNotificationProvider.tsx.html +0 -844
- package/coverage/lcov-report/components/LoginComponent.tsx.html +0 -676
- package/coverage/lcov-report/components/PasswordRequirements/index.html +0 -116
- package/coverage/lcov-report/components/PasswordRequirements/index.tsx.html +0 -232
- package/coverage/lcov-report/components/PublicPolicies/FieldSelector/FieldSelector.tsx.html +0 -1078
- package/coverage/lcov-report/components/PublicPolicies/FieldSelector/index.html +0 -131
- package/coverage/lcov-report/components/PublicPolicies/FieldSelector/index.ts.html +0 -88
- package/coverage/lcov-report/components/PublicPolicies/Policies.tsx.html +0 -625
- package/coverage/lcov-report/components/PublicPolicies/PolicyItem/PolicyItem.tsx.html +0 -886
- package/coverage/lcov-report/components/PublicPolicies/PolicyItem/index.html +0 -131
- package/coverage/lcov-report/components/PublicPolicies/PolicyItem/index.ts.html +0 -88
- package/coverage/lcov-report/components/PublicPolicies/constants.ts.html +0 -106
- package/coverage/lcov-report/components/PublicPolicies/index.html +0 -146
- package/coverage/lcov-report/components/PublicPolicies/index.ts.html +0 -88
- package/coverage/lcov-report/components/Routing/AuthRoute.tsx.html +0 -382
- package/coverage/lcov-report/components/Routing/GuestRoute.tsx.html +0 -352
- package/coverage/lcov-report/components/Routing/ProtectedRoute.tsx.html +0 -316
- package/coverage/lcov-report/components/Routing/index.html +0 -161
- package/coverage/lcov-report/components/Routing/index.ts.html +0 -109
- package/coverage/lcov-report/components/SessionLoadingScreen/index.html +0 -116
- package/coverage/lcov-report/components/SessionLoadingScreen/index.tsx.html +0 -379
- package/coverage/lcov-report/components/SessionTimeIndicator/index.html +0 -116
- package/coverage/lcov-report/components/SessionTimeIndicator/index.tsx.html +0 -523
- package/coverage/lcov-report/components/UserProfile/UserProfileDisplay.tsx.html +0 -931
- package/coverage/lcov-report/components/UserProfile/index.html +0 -131
- package/coverage/lcov-report/components/UserProfile/index.ts.html +0 -88
- package/coverage/lcov-report/components/index.html +0 -191
- package/coverage/lcov-report/components/index.ts.html +0 -178
- package/coverage/lcov-report/core/CrossTabSyncManager.ts.html +0 -853
- package/coverage/lcov-report/core/CrudifyInitializationManager.ts.html +0 -1279
- package/coverage/lcov-report/core/SessionManager.ts.html +0 -3064
- package/coverage/lcov-report/core/index.html +0 -146
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/hooks/index.html +0 -191
- package/coverage/lcov-report/hooks/index.ts.html +0 -136
- package/coverage/lcov-report/hooks/useAuth.ts.html +0 -529
- package/coverage/lcov-report/hooks/useAutoGenerate.ts.html +0 -571
- package/coverage/lcov-report/hooks/useCrudifyWithNotifications/constants.ts.html +0 -247
- package/coverage/lcov-report/hooks/useCrudifyWithNotifications/hooks/index.html +0 -116
- package/coverage/lcov-report/hooks/useCrudifyWithNotifications/hooks/useCrudOperations.ts.html +0 -820
- package/coverage/lcov-report/hooks/useCrudifyWithNotifications/index.html +0 -146
- package/coverage/lcov-report/hooks/useCrudifyWithNotifications/index.ts.html +0 -118
- package/coverage/lcov-report/hooks/useCrudifyWithNotifications/useCrudifyWithNotifications.ts.html +0 -565
- package/coverage/lcov-report/hooks/useCrudifyWithNotifications/utils/errorMessageResolver.ts.html +0 -847
- package/coverage/lcov-report/hooks/useCrudifyWithNotifications/utils/index.html +0 -146
- package/coverage/lcov-report/hooks/useCrudifyWithNotifications/utils/notificationFilters.ts.html +0 -313
- package/coverage/lcov-report/hooks/useCrudifyWithNotifications/utils/successMessageResolver.ts.html +0 -265
- package/coverage/lcov-report/hooks/useData.ts.html +0 -829
- package/coverage/lcov-report/hooks/useFileUpload/index.html +0 -131
- package/coverage/lcov-report/hooks/useFileUpload/index.ts.html +0 -112
- package/coverage/lcov-report/hooks/useFileUpload/services/index.html +0 -131
- package/coverage/lcov-report/hooks/useFileUpload/services/index.ts.html +0 -106
- package/coverage/lcov-report/hooks/useFileUpload/services/uploadService.ts.html +0 -610
- package/coverage/lcov-report/hooks/useFileUpload/useFileUpload.ts.html +0 -2092
- package/coverage/lcov-report/hooks/useFileUpload/utils/fileUtils.ts.html +0 -271
- package/coverage/lcov-report/hooks/useFileUpload/utils/index.html +0 -161
- package/coverage/lcov-report/hooks/useFileUpload/utils/index.ts.html +0 -109
- package/coverage/lcov-report/hooks/useFileUpload/utils/mimeTypes.ts.html +0 -235
- package/coverage/lcov-report/hooks/useFileUpload/utils/validation.ts.html +0 -403
- package/coverage/lcov-report/hooks/useSession/constants.ts.html +0 -217
- package/coverage/lcov-report/hooks/useSession/hooks/index.html +0 -176
- package/coverage/lcov-report/hooks/useSession/hooks/useAuthEventSubscriber.ts.html +0 -331
- package/coverage/lcov-report/hooks/useSession/hooks/useCrossTabSync.ts.html +0 -535
- package/coverage/lcov-report/hooks/useSession/hooks/useSessionActions.ts.html +0 -664
- package/coverage/lcov-report/hooks/useSession/hooks/useSessionState.ts.html +0 -295
- package/coverage/lcov-report/hooks/useSession/hooks/useTokenRefreshScheduler.ts.html +0 -535
- package/coverage/lcov-report/hooks/useSession/index.html +0 -161
- package/coverage/lcov-report/hooks/useSession/index.ts.html +0 -127
- package/coverage/lcov-report/hooks/useSession/types.ts.html +0 -427
- package/coverage/lcov-report/hooks/useSession/useSession.ts.html +0 -526
- package/coverage/lcov-report/hooks/useSession/utils/index.html +0 -131
- package/coverage/lcov-report/hooks/useSession/utils/initializeSession.ts.html +0 -424
- package/coverage/lcov-report/hooks/useSession/utils/tokenUtils.ts.html +0 -298
- package/coverage/lcov-report/hooks/useUserData.ts.html +0 -1210
- package/coverage/lcov-report/hooks/useUserProfile.ts.html +0 -820
- package/coverage/lcov-report/index.html +0 -656
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/providers/CrudifyThemeProvider.tsx.html +0 -316
- package/coverage/lcov-report/providers/SessionProvider.tsx.html +0 -1120
- package/coverage/lcov-report/providers/TranslationsProvider.tsx.html +0 -1756
- package/coverage/lcov-report/providers/index.html +0 -146
- package/coverage/lcov-report/services/credentialsEventBus.ts.html +0 -319
- package/coverage/lcov-report/services/crudifyAdminWrapper.ts.html +0 -754
- package/coverage/lcov-report/services/index.html +0 -146
- package/coverage/lcov-report/services/translationService.ts.html +0 -1558
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -210
- package/coverage/lcov-report/translations/critical.ts.html +0 -1216
- package/coverage/lcov-report/translations/index.html +0 -116
- package/coverage/lcov-report/types/index.html +0 -116
- package/coverage/lcov-report/types/password.ts.html +0 -178
- package/coverage/lcov-report/utils/authErrorDetector.ts.html +0 -793
- package/coverage/lcov-report/utils/authEventBus.ts.html +0 -454
- package/coverage/lcov-report/utils/configResolver.ts.html +0 -460
- package/coverage/lcov-report/utils/cookieSync.ts.html +0 -595
- package/coverage/lcov-report/utils/errorHandler.ts.html +0 -1480
- package/coverage/lcov-report/utils/errorTranslation.ts.html +0 -868
- package/coverage/lcov-report/utils/index.html +0 -341
- package/coverage/lcov-report/utils/index.ts.html +0 -193
- package/coverage/lcov-report/utils/jwtUtils.ts.html +0 -325
- package/coverage/lcov-report/utils/logger.ts.html +0 -952
- package/coverage/lcov-report/utils/navigationTracker.ts.html +0 -562
- package/coverage/lcov-report/utils/passwordValidation.ts.html +0 -259
- package/coverage/lcov-report/utils/preAuthCheck.ts.html +0 -442
- package/coverage/lcov-report/utils/redirectSecurity.ts.html +0 -733
- package/coverage/lcov-report/utils/tenantConfig.ts.html +0 -712
- package/coverage/lcov-report/utils/tokenStorage.ts.html +0 -1825
- package/coverage/lcov-report/utils/webCrypto.ts.html +0 -490
- package/coverage/lcov.info +0 -23367
- package/coverage/prettify.css +0 -1
- package/coverage/prettify.js +0 -2
- package/coverage/providers/CrudifyThemeProvider.tsx.html +0 -316
- package/coverage/providers/SessionProvider.tsx.html +0 -1120
- package/coverage/providers/TranslationsProvider.tsx.html +0 -1756
- package/coverage/providers/index.html +0 -146
- package/coverage/services/credentialsEventBus.ts.html +0 -319
- package/coverage/services/crudifyAdminWrapper.ts.html +0 -754
- package/coverage/services/index.html +0 -146
- package/coverage/services/translationService.ts.html +0 -1558
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +0 -210
- package/coverage/translations/critical.ts.html +0 -1216
- package/coverage/translations/index.html +0 -116
- package/coverage/types/index.html +0 -116
- package/coverage/types/password.ts.html +0 -178
- package/coverage/utils/authErrorDetector.ts.html +0 -793
- package/coverage/utils/authEventBus.ts.html +0 -454
- package/coverage/utils/configResolver.ts.html +0 -460
- package/coverage/utils/cookieSync.ts.html +0 -595
- package/coverage/utils/errorHandler.ts.html +0 -1480
- package/coverage/utils/errorTranslation.ts.html +0 -868
- package/coverage/utils/index.html +0 -341
- package/coverage/utils/index.ts.html +0 -193
- package/coverage/utils/jwtUtils.ts.html +0 -325
- package/coverage/utils/logger.ts.html +0 -952
- package/coverage/utils/navigationTracker.ts.html +0 -562
- package/coverage/utils/passwordValidation.ts.html +0 -259
- package/coverage/utils/preAuthCheck.ts.html +0 -442
- package/coverage/utils/redirectSecurity.ts.html +0 -733
- package/coverage/utils/tenantConfig.ts.html +0 -712
- package/coverage/utils/tokenStorage.ts.html +0 -1825
- package/coverage/utils/webCrypto.ts.html +0 -490
- package/dist/CrudiaMarkdownField-DM6NR8zw.d.mts +0 -343
- package/dist/CrudiaMarkdownField-UJaiSq9_.d.ts +0 -343
- package/dist/GlobalNotificationProvider-Cx540WKg.d.mts +0 -96
- package/dist/GlobalNotificationProvider-Cx540WKg.d.ts +0 -96
- package/dist/chunk-2DXLCBOT.mjs +0 -1
- package/dist/chunk-DYRZIARH.js +0 -1
- package/dist/chunk-GCSJXEGT.mjs +0 -1
- package/dist/chunk-GJUZD5ZN.js +0 -1
- package/dist/chunk-K47I475N.js +0 -1
- package/dist/chunk-OCYZGEM5.mjs +0 -1
- package/dist/chunk-PI7HPRDB.js +0 -1
- package/dist/chunk-QVEUGJBY.mjs +0 -1
- package/dist/chunk-UROR7G7N.mjs +0 -1
- package/dist/chunk-XFT47DEL.js +0 -1
- package/dist/components.d.mts +0 -24
- package/dist/components.d.ts +0 -24
- package/dist/components.js +0 -1
- package/dist/components.mjs +0 -1
- package/dist/tenantConfig-DxpfrAof.d.mts +0 -318
- package/dist/tenantConfig-DxpfrAof.d.ts +0 -318
- package/eslint.config.mjs +0 -140
- package/scripts/bump-version.cjs +0 -23
- package/sonar-project.properties +0 -23
- package/tests/helpers/mockFactories.ts +0 -218
- package/tests/helpers/testUtils.tsx +0 -154
- package/tests/hooks/useSession/testUtils.tsx +0 -212
- package/tests/setup.ts +0 -139
- package/tests/vitest.d.ts +0 -1
- package/vitest.config.ts +0 -40
package/dist/index.d.mts
CHANGED
|
@@ -1,17 +1,71 @@
|
|
|
1
1
|
import { CrudifyInstance } from '@nocios/crudify-sdk';
|
|
2
2
|
export * from '@nocios/crudify-sdk';
|
|
3
3
|
export { CrudifyInstance } from '@nocios/crudify-sdk';
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export {
|
|
4
|
+
import React, { ReactNode, RefObject } from 'react';
|
|
5
|
+
import { PasswordRule, FrontendEnvironment, AdminApiResponse, ModuleDefinition, ModuleCreateInput, ModuleEditInput, ModuleVersionItem, AdminActionFilters, ActionDefinition, ActionCreateInput, ActionEditInput, ActionVersionItem, UpdateActionsProfilesInput, UpdateActionsProfilesResponse, CalculatePermissionsInput, CalculatePermissionsResponse } from '@nocios/frontend-types';
|
|
6
|
+
export { CrudifyOperationOptions, CrudifyRequestOptions, CrudifyResponse, CrudifyTransactionResponse, FrontendEnvironment, PasswordRule, PasswordRuleType, TenantConfig, TransactionInput, TransactionOperation, TransactionResponseData } from '@nocios/frontend-types';
|
|
7
|
+
import { PolicyAction } from './public-policies.mjs';
|
|
8
|
+
export { POLICY_ACTIONS, PREFERRED_POLICY_ORDER } from './public-policies.mjs';
|
|
9
|
+
export { A as ApiError, F as ForgotPasswordRequest, J as JwtPayload, L as LoginRequest, a as LoginResponse, R as ResetPasswordRequest, U as UserProfile, V as ValidateCodeRequest, b as ValidationError } from './api-jcCTCqPD.mjs';
|
|
10
|
+
import { A as AutoGenerateConfig } from './index-Cx9P3ZCG.mjs';
|
|
11
|
+
export { F as FileItem, a as FileStatus, G as GlobalNotificationProvider, b as GlobalNotificationProviderProps, L as LoginResult, N as Notification, c as NotificationOptions, d as NotificationSeverity, S as SessionConfig, e as SessionDebugInfo, f as SessionManager, g as SessionProvider, h as SessionProviderProps, i as SessionState, j as StorageType, T as TokenData, k as TokenStorage, U as UseAuthReturn, l as UseAutoGenerateOptions, m as UseAutoGenerateReturn, n as UseDataReturn, o as UseFileUploadOptions, p as UseFileUploadReturn, q as UseSessionOptions, r as UseUserDataOptions, s as UseUserDataReturn, t as UserData, u as useAuth, v as useAutoGenerate, w as useCrudifyWithNotifications, x as useData, y as useFileUpload, z as useGlobalNotification, B as useSession, C as useSessionContext, D as useUserData, E as useUserProfile } from './index-Cx9P3ZCG.mjs';
|
|
9
12
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
10
13
|
import { ThemeOptions } from '@mui/material';
|
|
11
|
-
|
|
12
|
-
export {
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
import { LogContext } from '@nocios/frontend-types/shared';
|
|
15
|
+
export { LogContext, LogLevel } from '@nocios/frontend-types/shared';
|
|
16
|
+
export { C as CrudifyEnvironment, E as ERROR_CODES, a as ERROR_SEVERITY_MAP, b as ErrorCode, c as ErrorSeverity, d as ErrorTranslationConfig, P as ParsedError, R as ResolvedTenantConfig, T as TenantConfigOptions, e as createErrorTranslator, f as decodeJwtSafely, g as getCurrentUserEmail, h as getErrorMessage, i as handleCrudifyError, j as isTokenExpired, p as parseApiError, k as parseJavaScriptError, l as parseTransactionError, r as resolveTenantConfig, s as secureLocalStorage, m as secureSessionStorage, t as translateError, n as translateErrorCode, o as translateErrorCodes, u as useTenantConfig } from './errorTranslation-BxJmBGx0.mjs';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Password validation types and constants
|
|
20
|
+
* Used for password requirements validation in forms
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
interface EvaluatedPasswordRule {
|
|
24
|
+
message: string;
|
|
25
|
+
valid: boolean;
|
|
26
|
+
enforce: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Default password rules used as fallback when no custom rules are provided.
|
|
30
|
+
* Messages are translation keys that should be translated at runtime.
|
|
31
|
+
*/
|
|
32
|
+
declare const DEFAULT_PASSWORD_RULES: PasswordRule[];
|
|
33
|
+
|
|
34
|
+
type BoxScreenType = 'login' | 'signUp' | 'forgotPassword' | 'resetPassword' | 'checkCode';
|
|
35
|
+
interface CrudifyLoginConfig {
|
|
36
|
+
publicApiKey?: string | null;
|
|
37
|
+
env?: FrontendEnvironment;
|
|
38
|
+
appName?: string;
|
|
39
|
+
logo?: string;
|
|
40
|
+
loginActions?: string[];
|
|
41
|
+
}
|
|
42
|
+
interface CrudifyLoginTranslations {
|
|
43
|
+
[key: string]: string | CrudifyLoginTranslations;
|
|
44
|
+
}
|
|
45
|
+
interface UserLoginData {
|
|
46
|
+
token: string;
|
|
47
|
+
username?: string;
|
|
48
|
+
email?: string;
|
|
49
|
+
userId?: string;
|
|
50
|
+
profile?: Record<string, unknown>;
|
|
51
|
+
[key: string]: unknown;
|
|
52
|
+
}
|
|
53
|
+
interface CrudifyLoginProps {
|
|
54
|
+
onScreenChange?: (screen: BoxScreenType, params?: Record<string, string>) => void;
|
|
55
|
+
onExternalNavigate?: (path: string) => void;
|
|
56
|
+
onLoginSuccess?: (userData: UserLoginData, redirectUrl?: string) => void;
|
|
57
|
+
onError?: (error: string) => void;
|
|
58
|
+
initialScreen?: BoxScreenType;
|
|
59
|
+
redirectUrl?: string;
|
|
60
|
+
autoReadFromCookies?: boolean;
|
|
61
|
+
translations?: CrudifyLoginTranslations;
|
|
62
|
+
translationsUrl?: string;
|
|
63
|
+
language?: string;
|
|
64
|
+
/** Custom password rules for reset password form. Falls back to default rules if not provided. */
|
|
65
|
+
passwordRules?: PasswordRule[];
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
declare const CrudifyLogin: React.FC<CrudifyLoginProps>;
|
|
15
69
|
|
|
16
70
|
interface CrudifyContextValue {
|
|
17
71
|
crudify: typeof CrudifyInstance | null;
|
|
@@ -30,6 +84,35 @@ interface CrudifyProviderProps {
|
|
|
30
84
|
declare const CrudifyProvider: React.FC<CrudifyProviderProps>;
|
|
31
85
|
declare const useCrudify: () => CrudifyContextValue;
|
|
32
86
|
|
|
87
|
+
interface UserProfileDisplayProps {
|
|
88
|
+
showExtendedData?: boolean;
|
|
89
|
+
showProfileCard?: boolean;
|
|
90
|
+
autoRefresh?: boolean;
|
|
91
|
+
}
|
|
92
|
+
declare const UserProfileDisplay: React.FC<UserProfileDisplayProps>;
|
|
93
|
+
|
|
94
|
+
type Policy = {
|
|
95
|
+
id: string;
|
|
96
|
+
action: PolicyAction;
|
|
97
|
+
fields?: {
|
|
98
|
+
allow: string[];
|
|
99
|
+
owner_allow: string[];
|
|
100
|
+
deny: string[];
|
|
101
|
+
};
|
|
102
|
+
permission?: string;
|
|
103
|
+
};
|
|
104
|
+
type FieldErrorMap = string | ({
|
|
105
|
+
_error?: string;
|
|
106
|
+
} & Record<string, string | undefined>);
|
|
107
|
+
interface PoliciesProps {
|
|
108
|
+
policies: Policy[];
|
|
109
|
+
onChange: (next: Policy[]) => void;
|
|
110
|
+
availableFields: string[];
|
|
111
|
+
errors?: FieldErrorMap;
|
|
112
|
+
isSubmitting?: boolean;
|
|
113
|
+
}
|
|
114
|
+
declare const Policies: React.FC<PoliciesProps>;
|
|
115
|
+
|
|
33
116
|
/**
|
|
34
117
|
* Types of messages that can be sent between tabs
|
|
35
118
|
*/
|
|
@@ -146,6 +229,253 @@ type CrudifyThemeProviderProps = {
|
|
|
146
229
|
*/
|
|
147
230
|
declare function CrudifyThemeProvider({ children, defaultTheme, disableCssBaseline, }: Readonly<CrudifyThemeProviderProps>): react_jsx_runtime.JSX.Element;
|
|
148
231
|
|
|
232
|
+
declare function LoginComponent(): react_jsx_runtime.JSX.Element;
|
|
233
|
+
/**
|
|
234
|
+
* Simple session status component to display anywhere
|
|
235
|
+
*/
|
|
236
|
+
declare function SessionStatus(): react_jsx_runtime.JSX.Element;
|
|
237
|
+
|
|
238
|
+
interface CrudiaAutoGenerateProps {
|
|
239
|
+
config: AutoGenerateConfig;
|
|
240
|
+
value?: string;
|
|
241
|
+
onChange?: (value: string) => void;
|
|
242
|
+
label?: string;
|
|
243
|
+
error?: boolean;
|
|
244
|
+
helperText?: string;
|
|
245
|
+
readOnly?: boolean;
|
|
246
|
+
disabled?: boolean;
|
|
247
|
+
name?: string;
|
|
248
|
+
containerRef?: React.RefObject<HTMLDivElement | null>;
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Component for auto-generated fields (sequential codes)
|
|
252
|
+
*
|
|
253
|
+
* Features:
|
|
254
|
+
* - Auto-fetches the code on mount
|
|
255
|
+
* - Automatic duplicate error detection
|
|
256
|
+
* - "Regenerate" button in endAdornment when there is a duplicate error
|
|
257
|
+
* - Loading and error states
|
|
258
|
+
* - Read-only by default
|
|
259
|
+
* - Integration with useAutoGenerate hook
|
|
260
|
+
*
|
|
261
|
+
* Duplicate Error Handling Flow:
|
|
262
|
+
* 1. User opens form -> Code is generated automatically (e.g.: PROD-0013671)
|
|
263
|
+
* 2. User fills the form and submits
|
|
264
|
+
* 3. Backend returns "duplicate key" or "unique constraint" error
|
|
265
|
+
* 4. Parent form passes error={true} and helperText="Code already exists"
|
|
266
|
+
* 5. Component detects duplicate keywords and shows regenerate button
|
|
267
|
+
* 6. User clicks regenerate button -> New code is generated
|
|
268
|
+
* 7. onChange is called with new code -> Parent form clears the error
|
|
269
|
+
* 8. Regenerate button disappears (because there is no longer an error)
|
|
270
|
+
*
|
|
271
|
+
* @example
|
|
272
|
+
* ```tsx
|
|
273
|
+
* // Basic usage
|
|
274
|
+
* <CrudiaAutoGenerate
|
|
275
|
+
* config={{ prefix: "PROD-", padding: 7 }}
|
|
276
|
+
* onChange={(code) => setFormData({ ...formData, barCode: code })}
|
|
277
|
+
* label="Código de Barras"
|
|
278
|
+
* />
|
|
279
|
+
*
|
|
280
|
+
* // With duplicate error handling from the form
|
|
281
|
+
* <CrudiaAutoGenerate
|
|
282
|
+
* config={{ prefix: "PROD-", padding: 7 }}
|
|
283
|
+
* onChange={(code) => {
|
|
284
|
+
* setFormData({ ...formData, barCode: code });
|
|
285
|
+
* // Clear error when the code changes
|
|
286
|
+
* setFormErrors({ ...formErrors, barCode: null });
|
|
287
|
+
* }}
|
|
288
|
+
* label="Código de Barras"
|
|
289
|
+
* error={!!formErrors.barCode}
|
|
290
|
+
* helperText={formErrors.barCode}
|
|
291
|
+
* />
|
|
292
|
+
* ```
|
|
293
|
+
*/
|
|
294
|
+
declare const CrudiaAutoGenerate: React.FC<CrudiaAutoGenerateProps>;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Types and interfaces for CrudiaFileField component
|
|
298
|
+
*/
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Deletion handlers exposed by the component
|
|
302
|
+
*/
|
|
303
|
+
interface CrudiaFileFieldDeletionHandlers {
|
|
304
|
+
/** Execute all pending deletions (call this on form success callback) */
|
|
305
|
+
commitDeletions: () => Promise<{
|
|
306
|
+
success: boolean;
|
|
307
|
+
errors: string[];
|
|
308
|
+
}>;
|
|
309
|
+
/** Cancel all pending deletions and restore files */
|
|
310
|
+
restorePendingDeletions: () => void;
|
|
311
|
+
/** Whether there are files pending deletion */
|
|
312
|
+
hasPendingDeletions: boolean;
|
|
313
|
+
/** Mark the field as submitted (triggers validation errors display) */
|
|
314
|
+
markAsSubmitted: () => void;
|
|
315
|
+
/** Whether the field is valid */
|
|
316
|
+
isValid: boolean;
|
|
317
|
+
/** Whether files are currently being uploaded */
|
|
318
|
+
isUploading: boolean;
|
|
319
|
+
/** Wait for all uploads to complete - returns completed file paths */
|
|
320
|
+
waitForUploads: () => Promise<string[]>;
|
|
321
|
+
/** Get completed file paths synchronously (may be stale if uploads just finished) */
|
|
322
|
+
getCompletedFilePaths: () => string[];
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Props del componente CrudiaFileField
|
|
326
|
+
*/
|
|
327
|
+
interface CrudiaFileFieldProps {
|
|
328
|
+
/** Label del campo */
|
|
329
|
+
label?: string;
|
|
330
|
+
/** Tipos MIME permitidos (ej: ["image/png", "image/jpeg"]) */
|
|
331
|
+
accept?: string[];
|
|
332
|
+
/** Tamaño máximo por archivo en bytes */
|
|
333
|
+
maxFileSize?: number;
|
|
334
|
+
/** Permitir múltiples archivos */
|
|
335
|
+
multiple?: boolean;
|
|
336
|
+
/** Número máximo de archivos (solo si multiple=true) */
|
|
337
|
+
maxFiles?: number;
|
|
338
|
+
/** Número mínimo de archivos requeridos */
|
|
339
|
+
minFiles?: number;
|
|
340
|
+
/** Campo requerido */
|
|
341
|
+
required?: boolean;
|
|
342
|
+
/** Campo deshabilitado */
|
|
343
|
+
disabled?: boolean;
|
|
344
|
+
/** Error externo */
|
|
345
|
+
error?: boolean;
|
|
346
|
+
/** Texto de ayuda o error */
|
|
347
|
+
helperText?: string;
|
|
348
|
+
/**
|
|
349
|
+
* Callback cuando cambian los filePaths de archivos completados
|
|
350
|
+
* Los filePaths son rutas relativas con visibility (public/... o private/...)
|
|
351
|
+
*/
|
|
352
|
+
onChange?: (filePaths: string[]) => void;
|
|
353
|
+
/** Callback cuando se valida el campo */
|
|
354
|
+
onValidation?: (isValid: boolean, error: string | null) => void;
|
|
355
|
+
/** Archivos existentes (para edición) - usar filePath (ruta relativa con visibility) */
|
|
356
|
+
initialFiles?: Array<{
|
|
357
|
+
filePath: string;
|
|
358
|
+
name: string;
|
|
359
|
+
size?: number;
|
|
360
|
+
contentType?: string;
|
|
361
|
+
}>;
|
|
362
|
+
/** Texto placeholder para drag zone */
|
|
363
|
+
placeholder?: string;
|
|
364
|
+
/** Mostrar lista de archivos */
|
|
365
|
+
showFileList?: boolean;
|
|
366
|
+
/**
|
|
367
|
+
* Visibilidad de los archivos subidos
|
|
368
|
+
* @default "private"
|
|
369
|
+
*/
|
|
370
|
+
visibility?: 'public' | 'private';
|
|
371
|
+
/**
|
|
372
|
+
* Mostrar preview de imágenes
|
|
373
|
+
* @default true para imágenes
|
|
374
|
+
*/
|
|
375
|
+
showPreview?: boolean;
|
|
376
|
+
/**
|
|
377
|
+
* URL base para prefijar al path del archivo
|
|
378
|
+
* El valor guardado será baseUrl + path
|
|
379
|
+
* También se usa para previsualizar/descargar archivos públicos en modo readonly
|
|
380
|
+
*/
|
|
381
|
+
baseUrl: string;
|
|
382
|
+
/**
|
|
383
|
+
* Callback called when deletion handlers are ready
|
|
384
|
+
* Use this to get access to commitDeletions and restorePendingDeletions functions
|
|
385
|
+
*/
|
|
386
|
+
onDeletionHandlersReady?: (handlers: CrudiaFileFieldDeletionHandlers) => void;
|
|
387
|
+
/**
|
|
388
|
+
* Form mode: 'create' or 'edit' - affects delete behavior
|
|
389
|
+
* - create: delete shows confirmation and deletes immediately from server
|
|
390
|
+
* - edit: existing files use pendingDeletion, new files delete immediately
|
|
391
|
+
* @default "create"
|
|
392
|
+
*/
|
|
393
|
+
mode?: 'create' | 'edit';
|
|
394
|
+
/** HTML name attribute for the hidden file input */
|
|
395
|
+
name?: string;
|
|
396
|
+
/** Ref para el contenedor (usado para scroll en errores) */
|
|
397
|
+
containerRef?: RefObject<HTMLDivElement | null>;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* File field component with:
|
|
402
|
+
* - Drag & drop
|
|
403
|
+
* - File preview
|
|
404
|
+
* - Progress bar during upload
|
|
405
|
+
* - Delete files (soft delete)
|
|
406
|
+
* - Type and size validation
|
|
407
|
+
* - Single/multiple support
|
|
408
|
+
*/
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* Main file field component
|
|
412
|
+
*
|
|
413
|
+
* @example
|
|
414
|
+
* ```tsx
|
|
415
|
+
* // Basic usage - single file
|
|
416
|
+
* <CrudiaFileField
|
|
417
|
+
* label="Document"
|
|
418
|
+
* accept={["application/pdf"]}
|
|
419
|
+
* onChange={(filePaths) => setFormData({ ...formData, document: filePaths[0] })}
|
|
420
|
+
* />
|
|
421
|
+
*
|
|
422
|
+
* // Multiple files with limits
|
|
423
|
+
* <CrudiaFileField
|
|
424
|
+
* label="Images"
|
|
425
|
+
* accept={["image/png", "image/jpeg"]}
|
|
426
|
+
* multiple
|
|
427
|
+
* maxFiles={5}
|
|
428
|
+
* minFiles={1}
|
|
429
|
+
* maxFileSize={5 * 1024 * 1024}
|
|
430
|
+
* onChange={(filePaths) => setFormData({ ...formData, images: filePaths })}
|
|
431
|
+
* />
|
|
432
|
+
*
|
|
433
|
+
* // With initial files (edit mode)
|
|
434
|
+
* <CrudiaFileField
|
|
435
|
+
* label="Attachments"
|
|
436
|
+
* multiple
|
|
437
|
+
* initialFiles={existingFiles}
|
|
438
|
+
* onChange={handleFilesChange}
|
|
439
|
+
* />
|
|
440
|
+
* ```
|
|
441
|
+
*/
|
|
442
|
+
declare const CrudiaFileField: React.FC<CrudiaFileFieldProps>;
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* Markdown field component with rich text editing using MDXEditor
|
|
446
|
+
* - WYSIWYG markdown editing
|
|
447
|
+
* - Toolbar with formatting options
|
|
448
|
+
* - Saves content as markdown string
|
|
449
|
+
*/
|
|
450
|
+
|
|
451
|
+
interface CrudiaMarkdownFieldProps {
|
|
452
|
+
/** Field label */
|
|
453
|
+
label?: string;
|
|
454
|
+
/** Current value (markdown string) */
|
|
455
|
+
value?: string;
|
|
456
|
+
/** Callback when content changes */
|
|
457
|
+
onChange?: (value: string) => void;
|
|
458
|
+
/** Required field */
|
|
459
|
+
required?: boolean;
|
|
460
|
+
/** Disabled/readonly field */
|
|
461
|
+
disabled?: boolean;
|
|
462
|
+
/** External error state */
|
|
463
|
+
error?: boolean;
|
|
464
|
+
/** Helper or error text */
|
|
465
|
+
helperText?: string;
|
|
466
|
+
/** Placeholder text */
|
|
467
|
+
placeholder?: string;
|
|
468
|
+
/** Minimum editor height in pixels */
|
|
469
|
+
minHeight?: number;
|
|
470
|
+
/** Maximum editor height in pixels (scrolls after) */
|
|
471
|
+
maxHeight?: number;
|
|
472
|
+
/** HTML name attribute for hidden input (for form semantics) */
|
|
473
|
+
name?: string;
|
|
474
|
+
/** Ref para el contenedor (usado para scroll en errores) */
|
|
475
|
+
containerRef?: React.RefObject<HTMLDivElement | null>;
|
|
476
|
+
}
|
|
477
|
+
declare const CrudiaMarkdownField: React.FC<CrudiaMarkdownFieldProps>;
|
|
478
|
+
|
|
149
479
|
interface PasswordRequirementsProps {
|
|
150
480
|
requirements: Array<{
|
|
151
481
|
message: string;
|
|
@@ -174,97 +504,15 @@ declare function evaluatePasswordRules(password: string, rules: PasswordRule[]):
|
|
|
174
504
|
*/
|
|
175
505
|
declare function allPasswordRulesPassed(evaluated: EvaluatedPasswordRule[]): boolean;
|
|
176
506
|
|
|
177
|
-
/**
|
|
178
|
-
* Unified Logger for Crudify Projects
|
|
179
|
-
*
|
|
180
|
-
* Environment-based logging:
|
|
181
|
-
* - dev/stg: All logs (error, warn, info, debug)
|
|
182
|
-
* - prod: Only errors (default)
|
|
183
|
-
*
|
|
184
|
-
* AUTO-DETECTION (v2.0.0 - No longer uses cookies):
|
|
185
|
-
* The logger will automatically detect the environment from:
|
|
186
|
-
* 1. Explicit setEnvironment() call (highest priority)
|
|
187
|
-
* 2. window.__TENANT_CONFIG__.environment (production with Lambda@Edge)
|
|
188
|
-
* 3. window.__CRUDIFY_ENV__ global variable (legacy/fallback)
|
|
189
|
-
* 4. Default to "prod" for safety
|
|
190
|
-
*
|
|
191
|
-
* Usage:
|
|
192
|
-
* import { logger } from './logger';
|
|
193
|
-
*
|
|
194
|
-
* // Option 1: Explicit configuration (recommended for apps)
|
|
195
|
-
* logger.setEnvironment('dev'); // or 'stg', 'prod'
|
|
196
|
-
*
|
|
197
|
-
* // Option 2: Auto-detection (reads from window.__TENANT_CONFIG__)
|
|
198
|
-
* // Just use the logger - it will auto-detect
|
|
199
|
-
*
|
|
200
|
-
* logger.error('Something failed', { userId: '123' });
|
|
201
|
-
* logger.warn('Deprecated feature used');
|
|
202
|
-
* logger.info('User logged in', { email: 'user@example.com' });
|
|
203
|
-
* logger.debug('Processing request', { payload: data });
|
|
204
|
-
*/
|
|
205
|
-
type LogLevel = 'error' | 'warn' | 'info' | 'debug';
|
|
206
|
-
interface LogContext {
|
|
207
|
-
[key: string]: unknown;
|
|
208
|
-
}
|
|
209
507
|
declare class Logger {
|
|
210
|
-
private
|
|
211
|
-
private readonly prefix;
|
|
508
|
+
private readonly core;
|
|
212
509
|
constructor();
|
|
213
|
-
/**
|
|
214
|
-
* Get current effective environment
|
|
215
|
-
* Priority: explicit setEnvironment() > auto-detection
|
|
216
|
-
*/
|
|
217
|
-
private getEffectiveEnv;
|
|
218
|
-
/**
|
|
219
|
-
* Sanitize sensitive data from strings
|
|
220
|
-
*/
|
|
221
|
-
private sanitize;
|
|
222
|
-
/**
|
|
223
|
-
* Sanitize a single context value based on its key and type
|
|
224
|
-
*/
|
|
225
|
-
private sanitizeValue;
|
|
226
|
-
/**
|
|
227
|
-
* Sanitize context object
|
|
228
|
-
*/
|
|
229
|
-
private sanitizeContext;
|
|
230
|
-
/**
|
|
231
|
-
* Check if a log level should be displayed based on environment
|
|
232
|
-
* - dev/stg: show all logs
|
|
233
|
-
* - prod: show only errors (unless CRUDIFY_DEBUG_MODE is enabled)
|
|
234
|
-
*/
|
|
235
|
-
private shouldLog;
|
|
236
|
-
/**
|
|
237
|
-
* Format and output log entry
|
|
238
|
-
*/
|
|
239
|
-
private log;
|
|
240
|
-
/**
|
|
241
|
-
* Log an error - Always logged in all environments
|
|
242
|
-
*/
|
|
243
510
|
error(message: string, context?: LogContext | Error): void;
|
|
244
|
-
/**
|
|
245
|
-
* Log a warning - Only in dev/stg
|
|
246
|
-
*/
|
|
247
511
|
warn(message: string, context?: LogContext): void;
|
|
248
|
-
/**
|
|
249
|
-
* Log info - Only in dev/stg
|
|
250
|
-
*/
|
|
251
512
|
info(message: string, context?: LogContext): void;
|
|
252
|
-
/**
|
|
253
|
-
* Log debug information - Only in dev/stg
|
|
254
|
-
*/
|
|
255
513
|
debug(message: string, context?: LogContext): void;
|
|
256
|
-
/**
|
|
257
|
-
* Get current effective environment
|
|
258
|
-
*/
|
|
259
514
|
getEnvironment(): string;
|
|
260
|
-
/**
|
|
261
|
-
* Manually set environment (useful for libraries that receive env from parent app)
|
|
262
|
-
* This takes priority over auto-detection
|
|
263
|
-
*/
|
|
264
515
|
setEnvironment(env: string): void;
|
|
265
|
-
/**
|
|
266
|
-
* Check if environment was explicitly set or auto-detected
|
|
267
|
-
*/
|
|
268
516
|
isExplicitlyConfigured(): boolean;
|
|
269
517
|
}
|
|
270
518
|
declare const logger: Logger;
|
|
@@ -529,7 +777,7 @@ interface InitializationState {
|
|
|
529
777
|
interface InitializationRequest {
|
|
530
778
|
priority: InitializationPriority;
|
|
531
779
|
publicApiKey: string;
|
|
532
|
-
env:
|
|
780
|
+
env: FrontendEnvironment;
|
|
533
781
|
enableLogging?: boolean;
|
|
534
782
|
requestedBy: string;
|
|
535
783
|
}
|
|
@@ -684,7 +932,7 @@ declare const crudifyInitManager: CrudifyInitializationManager;
|
|
|
684
932
|
|
|
685
933
|
interface CrudifyInitializerConfig {
|
|
686
934
|
publicApiKey?: string;
|
|
687
|
-
env?:
|
|
935
|
+
env?: FrontendEnvironment;
|
|
688
936
|
enableLogging?: boolean;
|
|
689
937
|
}
|
|
690
938
|
interface CrudifyInitializerContextValue {
|
|
@@ -784,7 +1032,7 @@ interface I18nInstance {
|
|
|
784
1032
|
interface TranslationsProviderProps {
|
|
785
1033
|
children: React.ReactNode;
|
|
786
1034
|
apiKey?: string;
|
|
787
|
-
crudifyEnv?:
|
|
1035
|
+
crudifyEnv?: FrontendEnvironment;
|
|
788
1036
|
featureKeys?: string[];
|
|
789
1037
|
language?: string;
|
|
790
1038
|
devTranslations?: Record<string, string>;
|
|
@@ -870,7 +1118,7 @@ declare const useTranslations: () => TranslationsContextValue;
|
|
|
870
1118
|
|
|
871
1119
|
interface FetchTranslationsOptions {
|
|
872
1120
|
apiKey: string;
|
|
873
|
-
crudifyEnv?:
|
|
1121
|
+
crudifyEnv?: FrontendEnvironment;
|
|
874
1122
|
featureKeys?: string[];
|
|
875
1123
|
urlTranslations?: Record<string, string>;
|
|
876
1124
|
}
|
|
@@ -997,7 +1245,7 @@ declare const translationService: TranslationService;
|
|
|
997
1245
|
*/
|
|
998
1246
|
declare const CRITICAL_TRANSLATIONS: {
|
|
999
1247
|
readonly es: {
|
|
1000
|
-
readonly 'base.actions.create': "
|
|
1248
|
+
readonly 'base.actions.create': "Crear";
|
|
1001
1249
|
readonly 'base.actions.delete': "Eliminar";
|
|
1002
1250
|
readonly 'base.actions.read': "Ver";
|
|
1003
1251
|
readonly 'base.actions.refresh': "Refrescar";
|
|
@@ -1046,7 +1294,7 @@ declare const CRITICAL_TRANSLATIONS: {
|
|
|
1046
1294
|
readonly 'base.loading.starting': "Iniciando aplicación...";
|
|
1047
1295
|
readonly 'base.loading.themeSetup': "Generando tema...";
|
|
1048
1296
|
readonly 'base.loading.validatingSession': "Validando sesión...";
|
|
1049
|
-
readonly 'base.titles.create': "
|
|
1297
|
+
readonly 'base.titles.create': "Crear {{moduleName}}";
|
|
1050
1298
|
readonly 'base.titles.read': "Ver {{moduleName}}";
|
|
1051
1299
|
readonly 'base.titles.update': "Editar {{moduleName}}";
|
|
1052
1300
|
readonly 'base.success.transaction': "La operación se ha completado con éxito.";
|
|
@@ -1362,25 +1610,25 @@ declare const getCriticalTranslations: (language: string) => Record<string, stri
|
|
|
1362
1610
|
* Automatically injects JWT token in each request and handles token refresh on 401 errors.
|
|
1363
1611
|
*/
|
|
1364
1612
|
declare const crudifyAdmin: {
|
|
1365
|
-
listModules: () => Promise<
|
|
1366
|
-
getModule: (moduleKey: string) => Promise<
|
|
1367
|
-
createModule: (moduleData: ModuleCreateInput) => Promise<
|
|
1368
|
-
editModule: (moduleKey: string, moduleData: ModuleEditInput) => Promise<
|
|
1369
|
-
deleteModule: (moduleKey: string) => Promise<
|
|
1370
|
-
activateModule: (moduleKey: string) => Promise<
|
|
1371
|
-
deactivateModule: (moduleKey: string) => Promise<
|
|
1372
|
-
getModuleVersions: (moduleKey: string) => Promise<
|
|
1373
|
-
listActions: (filters?:
|
|
1374
|
-
getAction: (actionKey: string) => Promise<
|
|
1375
|
-
createAction: (actionData: ActionCreateInput) => Promise<
|
|
1376
|
-
editAction: (actionKey: string, actionData: ActionEditInput) => Promise<
|
|
1377
|
-
deleteAction: (actionKey: string) => Promise<
|
|
1378
|
-
activateAction: (actionKey: string) => Promise<
|
|
1379
|
-
deactivateAction: (actionKey: string) => Promise<
|
|
1380
|
-
getActionVersions: (actionKey: string) => Promise<
|
|
1381
|
-
getActionsByProfile: (profileId: string) => Promise<
|
|
1382
|
-
updateActionsProfiles: (data: UpdateActionsProfilesInput) => Promise<
|
|
1383
|
-
calculatePermissions: (data: CalculatePermissionsInput) => Promise<
|
|
1613
|
+
listModules: () => Promise<AdminApiResponse<ModuleDefinition[]>>;
|
|
1614
|
+
getModule: (moduleKey: string) => Promise<AdminApiResponse<ModuleDefinition>>;
|
|
1615
|
+
createModule: (moduleData: ModuleCreateInput) => Promise<AdminApiResponse<ModuleDefinition>>;
|
|
1616
|
+
editModule: (moduleKey: string, moduleData: ModuleEditInput) => Promise<AdminApiResponse<ModuleDefinition>>;
|
|
1617
|
+
deleteModule: (moduleKey: string) => Promise<AdminApiResponse>;
|
|
1618
|
+
activateModule: (moduleKey: string) => Promise<AdminApiResponse<ModuleDefinition>>;
|
|
1619
|
+
deactivateModule: (moduleKey: string) => Promise<AdminApiResponse<ModuleDefinition>>;
|
|
1620
|
+
getModuleVersions: (moduleKey: string) => Promise<AdminApiResponse<ModuleVersionItem[]>>;
|
|
1621
|
+
listActions: (filters?: AdminActionFilters) => Promise<AdminApiResponse<ActionDefinition[]>>;
|
|
1622
|
+
getAction: (actionKey: string) => Promise<AdminApiResponse<ActionDefinition>>;
|
|
1623
|
+
createAction: (actionData: ActionCreateInput) => Promise<AdminApiResponse<ActionDefinition>>;
|
|
1624
|
+
editAction: (actionKey: string, actionData: ActionEditInput) => Promise<AdminApiResponse<ActionDefinition>>;
|
|
1625
|
+
deleteAction: (actionKey: string) => Promise<AdminApiResponse>;
|
|
1626
|
+
activateAction: (actionKey: string) => Promise<AdminApiResponse<ActionDefinition>>;
|
|
1627
|
+
deactivateAction: (actionKey: string) => Promise<AdminApiResponse<ActionDefinition>>;
|
|
1628
|
+
getActionVersions: (actionKey: string) => Promise<AdminApiResponse<ActionVersionItem[]>>;
|
|
1629
|
+
getActionsByProfile: (profileId: string) => Promise<AdminApiResponse<ActionDefinition[]>>;
|
|
1630
|
+
updateActionsProfiles: (data: UpdateActionsProfilesInput) => Promise<AdminApiResponse<UpdateActionsProfilesResponse>>;
|
|
1631
|
+
calculatePermissions: (data: CalculatePermissionsInput) => Promise<AdminApiResponse<CalculatePermissionsResponse>>;
|
|
1384
1632
|
};
|
|
1385
1633
|
|
|
1386
|
-
export { AuthRoute, type AuthRouteProps, CRITICAL_TRANSLATIONS, type CriticalTranslationKey, type CrossTabListener, type CrossTabMessage, type CrossTabMessageType, CrossTabSyncManager, CrudifyInitializationManager, CrudifyInitializer, type CrudifyInitializerConfig, type CrudifyInitializerProps, CrudifyLoginConfig, CrudifyProvider, CrudifyThemeProvider, type CrudifyThemeProviderProps, EvaluatedPasswordRule, type FetchTranslationsOptions, GuestRoute, type GuestRouteBehavior, type GuestRouteProps, type InitializationPriority, type InitializationRequest, type InitializationStatus,
|
|
1634
|
+
export { AuthRoute, type AuthRouteProps, AutoGenerateConfig, type BoxScreenType, CRITICAL_TRANSLATIONS, type CriticalTranslationKey, type CrossTabListener, type CrossTabMessage, type CrossTabMessageType, CrossTabSyncManager, CrudiaAutoGenerate, type CrudiaAutoGenerateProps, CrudiaFileField, type CrudiaFileFieldDeletionHandlers, type CrudiaFileFieldProps, CrudiaMarkdownField, type CrudiaMarkdownFieldProps, CrudifyInitializationManager, CrudifyInitializer, type CrudifyInitializerConfig, type CrudifyInitializerProps, CrudifyLogin, type CrudifyLoginConfig, type CrudifyLoginProps, type CrudifyLoginTranslations, CrudifyProvider, CrudifyThemeProvider, type CrudifyThemeProviderProps, DEFAULT_PASSWORD_RULES, type EvaluatedPasswordRule, type FetchTranslationsOptions, GuestRoute, type GuestRouteBehavior, type GuestRouteProps, type InitializationPriority, type InitializationRequest, type InitializationStatus, LoginComponent, PasswordRequirements, type PasswordRequirementsProps, Policies, PolicyAction, ProtectedRoute, type ProtectedRouteProps, SessionLoadingScreen, type SessionLoadingScreenProps, SessionStatus, type SupportedLanguage, type TranslationResponse, TranslationService, type TranslationsContextValue, TranslationsProvider, type TranslationsProviderProps, type UserLoginData, UserProfileDisplay, allPasswordRulesPassed, clearCorruptedTokens, crossTabSync, crudifyAdmin, crudifyInitManager, evaluatePasswordRules, extractSafeRedirectFromUrl, getCriticalLanguages, getCriticalTranslations, hasCorruptedTokens, hasEncryptionKeyHash, hasStoredTokens, logger, shouldWaitForInitialization, translationService, useCrudify, useCrudifyInitializer, useTranslations, validateInternalRedirect, validateTrustedRedirect };
|