@payloadcms/next 3.70.0 → 3.71.0-internal-debug.80dab4c
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/dist/auth/login.js +52 -58
- package/dist/auth/login.js.map +1 -1
- package/dist/auth/logout.js +39 -44
- package/dist/auth/logout.js.map +1 -1
- package/dist/auth/refresh.js +45 -47
- package/dist/auth/refresh.js.map +1 -1
- package/dist/cjs/withPayload.cjs +61 -23
- package/dist/cjs/withPayload.cjs.map +2 -2
- package/dist/config.js +1 -0
- package/dist/config.js.map +1 -1
- package/dist/elements/DocumentHeader/Tabs/ShouldRenderTabs.js +9 -15
- package/dist/elements/DocumentHeader/Tabs/ShouldRenderTabs.js.map +1 -1
- package/dist/elements/DocumentHeader/Tabs/Tab/TabLink.js +40 -71
- package/dist/elements/DocumentHeader/Tabs/Tab/TabLink.js.map +1 -1
- package/dist/elements/DocumentHeader/Tabs/Tab/index.js +65 -59
- package/dist/elements/DocumentHeader/Tabs/Tab/index.js.map +1 -1
- package/dist/elements/DocumentHeader/Tabs/Tab/index.scss +38 -0
- package/dist/elements/DocumentHeader/Tabs/index.js +80 -70
- package/dist/elements/DocumentHeader/Tabs/index.js.map +1 -1
- package/dist/elements/DocumentHeader/Tabs/index.scss +54 -0
- package/dist/elements/DocumentHeader/Tabs/tabs/VersionsPill/index.js +16 -23
- package/dist/elements/DocumentHeader/Tabs/tabs/VersionsPill/index.js.map +1 -1
- package/dist/elements/DocumentHeader/Tabs/tabs/VersionsPill/index.scss +9 -0
- package/dist/elements/DocumentHeader/Tabs/tabs/index.js +61 -69
- package/dist/elements/DocumentHeader/Tabs/tabs/index.js.map +1 -1
- package/dist/elements/DocumentHeader/index.js +48 -28
- package/dist/elements/DocumentHeader/index.js.map +1 -1
- package/dist/elements/DocumentHeader/index.scss +64 -0
- package/dist/elements/FormHeader/index.js +30 -16
- package/dist/elements/FormHeader/index.js.map +1 -1
- package/dist/elements/FormHeader/index.scss +8 -0
- package/dist/elements/Logo/index.js +19 -34
- package/dist/elements/Logo/index.js.map +1 -1
- package/dist/elements/Nav/NavHamburger/index.js +23 -44
- package/dist/elements/Nav/NavHamburger/index.js.map +1 -1
- package/dist/elements/Nav/NavWrapper/index.js +28 -54
- package/dist/elements/Nav/NavWrapper/index.js.map +1 -1
- package/dist/elements/Nav/NavWrapper/index.scss +27 -0
- package/dist/elements/Nav/SettingsMenuButton/index.js +33 -39
- package/dist/elements/Nav/SettingsMenuButton/index.js.map +1 -1
- package/dist/elements/Nav/SettingsMenuButton/index.scss +11 -0
- package/dist/elements/Nav/getNavPrefs.js +27 -22
- package/dist/elements/Nav/getNavPrefs.js.map +1 -1
- package/dist/elements/Nav/index.client.js +97 -118
- package/dist/elements/Nav/index.client.js.map +1 -1
- package/dist/elements/Nav/index.js +148 -127
- package/dist/elements/Nav/index.js.map +1 -1
- package/dist/elements/Nav/index.scss +173 -0
- package/dist/esbuildEntry.d.ts +5 -0
- package/dist/esbuildEntry.d.ts.map +1 -0
- package/dist/esbuildEntry.js +6 -0
- package/dist/esbuildEntry.js.map +1 -0
- package/dist/exports/auth.js +1 -0
- package/dist/exports/auth.js.map +1 -1
- package/dist/exports/client.js +1 -1
- package/dist/exports/client.js.map +1 -1
- package/dist/exports/layouts.js +1 -0
- package/dist/exports/layouts.js.map +1 -1
- package/dist/exports/routes.js +1 -0
- package/dist/exports/routes.js.map +1 -1
- package/dist/exports/rsc.js +1 -0
- package/dist/exports/rsc.js.map +1 -1
- package/dist/exports/templates.js +1 -0
- package/dist/exports/templates.js.map +1 -1
- package/dist/exports/utilities.js +7 -12
- package/dist/exports/utilities.js.map +1 -1
- package/dist/exports/views.js +1 -0
- package/dist/exports/views.js.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/layouts/Root/NestProviders.js +21 -20
- package/dist/layouts/Root/NestProviders.js.map +1 -1
- package/dist/layouts/Root/checkDependencies.js +49 -41
- package/dist/layouts/Root/checkDependencies.js.map +1 -1
- package/dist/layouts/Root/index.js +128 -103
- package/dist/layouts/Root/index.js.map +1 -1
- package/dist/prod/styles.css +5 -1
- package/dist/routes/graphql/handler.js +114 -122
- package/dist/routes/graphql/handler.js.map +1 -1
- package/dist/routes/graphql/index.js +1 -0
- package/dist/routes/graphql/index.js.map +1 -1
- package/dist/routes/graphql/playground.js +28 -27
- package/dist/routes/graphql/playground.js.map +1 -1
- package/dist/routes/index.js +1 -0
- package/dist/routes/index.js.map +1 -1
- package/dist/routes/rest/index.js +23 -22
- package/dist/routes/rest/index.js.map +1 -1
- package/dist/routes/rest/og/image.js +103 -79
- package/dist/routes/rest/og/image.js.map +1 -1
- package/dist/routes/rest/og/index.js +59 -54
- package/dist/routes/rest/og/index.js.map +1 -1
- package/dist/templates/Default/NavHamburger/index.js +12 -20
- package/dist/templates/Default/NavHamburger/index.js.map +1 -1
- package/dist/templates/Default/Wrapper/index.js +20 -44
- package/dist/templates/Default/Wrapper/index.js.map +1 -1
- package/dist/templates/Default/Wrapper/index.scss +58 -0
- package/dist/templates/Default/index.js +147 -116
- package/dist/templates/Default/index.js.map +1 -1
- package/dist/templates/Default/index.scss +79 -0
- package/dist/templates/Minimal/index.js +26 -17
- package/dist/templates/Minimal/index.js.map +1 -1
- package/dist/templates/Minimal/index.scss +30 -0
- package/dist/utilities/getExistingAuthToken.js +3 -2
- package/dist/utilities/getExistingAuthToken.js.map +1 -1
- package/dist/utilities/getNextRequestI18n.js +12 -13
- package/dist/utilities/getNextRequestI18n.js.map +1 -1
- package/dist/utilities/getPayloadHMR.js +5 -5
- package/dist/utilities/getPayloadHMR.js.map +1 -1
- package/dist/utilities/getPreferences.js +27 -22
- package/dist/utilities/getPreferences.js.map +1 -1
- package/dist/utilities/getRequestLocale.js +13 -14
- package/dist/utilities/getRequestLocale.js.map +1 -1
- package/dist/utilities/getRequestTheme.js +19 -19
- package/dist/utilities/getRequestTheme.js.map +1 -1
- package/dist/utilities/getRouteWithoutAdmin.js +3 -5
- package/dist/utilities/getRouteWithoutAdmin.js.map +1 -1
- package/dist/utilities/handleAuthRedirect.js +22 -36
- package/dist/utilities/handleAuthRedirect.js.map +1 -1
- package/dist/utilities/handleServerFunctions.js +34 -41
- package/dist/utilities/handleServerFunctions.js.map +1 -1
- package/dist/utilities/initReq.js +78 -96
- package/dist/utilities/initReq.js.map +1 -1
- package/dist/utilities/isCustomAdminView.js +22 -26
- package/dist/utilities/isCustomAdminView.js.map +1 -1
- package/dist/utilities/isPublicAdminRoute.js +26 -20
- package/dist/utilities/isPublicAdminRoute.js.map +1 -1
- package/dist/utilities/meta.js +68 -63
- package/dist/utilities/meta.js.map +1 -1
- package/dist/utilities/selectiveCache.js +25 -26
- package/dist/utilities/selectiveCache.js.map +1 -1
- package/dist/utilities/setPayloadAuthCookie.js +19 -22
- package/dist/utilities/setPayloadAuthCookie.js.map +1 -1
- package/dist/utilities/slugify.js +24 -33
- package/dist/utilities/slugify.js.map +1 -1
- package/dist/utilities/timestamp.js +7 -6
- package/dist/utilities/timestamp.js.map +1 -1
- package/dist/views/API/LocaleSelector/index.js +17 -39
- package/dist/views/API/LocaleSelector/index.js.map +1 -1
- package/dist/views/API/RenderJSON/index.js +171 -126
- package/dist/views/API/RenderJSON/index.js.map +1 -1
- package/dist/views/API/RenderJSON/index.scss +129 -0
- package/dist/views/API/index.client.js +290 -197
- package/dist/views/API/index.client.js.map +1 -1
- package/dist/views/API/index.js +7 -2
- package/dist/views/API/index.js.map +1 -1
- package/dist/views/API/index.scss +119 -0
- package/dist/views/API/metadata.js +18 -23
- package/dist/views/API/metadata.js.map +1 -1
- package/dist/views/Account/ResetPreferences/index.js +78 -102
- package/dist/views/Account/ResetPreferences/index.js.map +1 -1
- package/dist/views/Account/Settings/LanguageSelector.js +18 -47
- package/dist/views/Account/Settings/LanguageSelector.js.map +1 -1
- package/dist/views/Account/Settings/index.js +60 -25
- package/dist/views/Account/Settings/index.js.map +1 -1
- package/dist/views/Account/Settings/index.scss +48 -0
- package/dist/views/Account/ToggleTheme/index.js +38 -55
- package/dist/views/Account/ToggleTheme/index.js.map +1 -1
- package/dist/views/Account/index.client.js +16 -32
- package/dist/views/Account/index.client.js.map +1 -1
- package/dist/views/Account/index.js +147 -158
- package/dist/views/Account/index.js.map +1 -1
- package/dist/views/Account/metadata.js +8 -12
- package/dist/views/Account/metadata.js.map +1 -1
- package/dist/views/BrowseByFolder/buildView.js +138 -157
- package/dist/views/BrowseByFolder/buildView.js.map +1 -1
- package/dist/views/BrowseByFolder/index.js +16 -16
- package/dist/views/BrowseByFolder/index.js.map +1 -1
- package/dist/views/BrowseByFolder/metadata.js +13 -15
- package/dist/views/BrowseByFolder/metadata.js.map +1 -1
- package/dist/views/CollectionFolders/buildView.js +122 -142
- package/dist/views/CollectionFolders/buildView.js.map +1 -1
- package/dist/views/CollectionFolders/index.js +16 -16
- package/dist/views/CollectionFolders/index.js.map +1 -1
- package/dist/views/CollectionFolders/metadata.js +18 -21
- package/dist/views/CollectionFolders/metadata.js.map +1 -1
- package/dist/views/CollectionFolders/renderFolderViewSlots.js +58 -61
- package/dist/views/CollectionFolders/renderFolderViewSlots.js.map +1 -1
- package/dist/views/CollectionTrash/index.js +17 -17
- package/dist/views/CollectionTrash/index.js.map +1 -1
- package/dist/views/CollectionTrash/metadata.js +18 -21
- package/dist/views/CollectionTrash/metadata.js.map +1 -1
- package/dist/views/CreateFirstUser/index.client.js +117 -103
- package/dist/views/CreateFirstUser/index.client.js.map +1 -1
- package/dist/views/CreateFirstUser/index.js +87 -81
- package/dist/views/CreateFirstUser/index.js.map +1 -1
- package/dist/views/CreateFirstUser/index.scss +21 -0
- package/dist/views/CreateFirstUser/metadata.js +8 -12
- package/dist/views/CreateFirstUser/metadata.js.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/DashboardStepNav.js +147 -138
- package/dist/views/Dashboard/Default/ModularDashboard/DashboardStepNav.js.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/index.client.js +423 -405
- package/dist/views/Dashboard/Default/ModularDashboard/index.client.js.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/index.js +72 -75
- package/dist/views/Dashboard/Default/ModularDashboard/index.js.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/index.scss +316 -0
- package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/RenderWidget.js +62 -89
- package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/RenderWidget.js.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/getDefaultLayoutServerFn.js +40 -47
- package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/getDefaultLayoutServerFn.js.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/renderWidgetServerFn.js +64 -65
- package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/renderWidgetServerFn.js.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/useDashboardLayout.js +164 -147
- package/dist/views/Dashboard/Default/ModularDashboard/useDashboardLayout.js.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/utils/collisionDetection.js +31 -30
- package/dist/views/Dashboard/Default/ModularDashboard/utils/collisionDetection.js.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/utils/sensors.js +223 -229
- package/dist/views/Dashboard/Default/ModularDashboard/utils/sensors.js.map +1 -1
- package/dist/views/Dashboard/Default/index.js +59 -45
- package/dist/views/Dashboard/Default/index.js.map +1 -1
- package/dist/views/Dashboard/index.js +46 -42
- package/dist/views/Dashboard/index.js.map +1 -1
- package/dist/views/Dashboard/metadata.js +10 -14
- package/dist/views/Dashboard/metadata.js.map +1 -1
- package/dist/views/Document/getCustomDocumentViewByKey.js +3 -2
- package/dist/views/Document/getCustomDocumentViewByKey.js.map +1 -1
- package/dist/views/Document/getCustomViewByRoute.js +27 -30
- package/dist/views/Document/getCustomViewByRoute.js.map +1 -1
- package/dist/views/Document/getDocPreferences.js +40 -41
- package/dist/views/Document/getDocPreferences.js.map +1 -1
- package/dist/views/Document/getDocumentData.js +44 -55
- package/dist/views/Document/getDocumentData.js.map +1 -1
- package/dist/views/Document/getDocumentPermissions.js +77 -80
- package/dist/views/Document/getDocumentPermissions.js.map +1 -1
- package/dist/views/Document/getDocumentView.js +313 -283
- package/dist/views/Document/getDocumentView.js.map +1 -1
- package/dist/views/Document/getIsLocked.js +66 -66
- package/dist/views/Document/getIsLocked.js.map +1 -1
- package/dist/views/Document/getMetaBySegment.js +130 -136
- package/dist/views/Document/getMetaBySegment.js.map +1 -1
- package/dist/views/Document/getVersions.js +205 -195
- package/dist/views/Document/getVersions.js.map +1 -1
- package/dist/views/Document/handleServerFunction.js +103 -128
- package/dist/views/Document/handleServerFunction.js.map +1 -1
- package/dist/views/Document/index.js +316 -355
- package/dist/views/Document/index.js.map +1 -1
- package/dist/views/Document/metadata.js +2 -1
- package/dist/views/Document/metadata.js.map +1 -1
- package/dist/views/Document/renderDocumentSlots.js +121 -132
- package/dist/views/Document/renderDocumentSlots.js.map +1 -1
- package/dist/views/Edit/index.js +10 -6
- package/dist/views/Edit/index.js.map +1 -1
- package/dist/views/Edit/metadata.js +36 -46
- package/dist/views/Edit/metadata.js.map +1 -1
- package/dist/views/ForgotPassword/ForgotPasswordForm/index.js +130 -164
- package/dist/views/ForgotPassword/ForgotPasswordForm/index.js.map +1 -1
- package/dist/views/ForgotPassword/index.js +79 -62
- package/dist/views/ForgotPassword/index.js.map +1 -1
- package/dist/views/ForgotPassword/metadata.js +8 -12
- package/dist/views/ForgotPassword/metadata.js.map +1 -1
- package/dist/views/List/createSerializableValue.js +12 -11
- package/dist/views/List/createSerializableValue.js.map +1 -1
- package/dist/views/List/enrichDocsWithVersionStatus.js +86 -86
- package/dist/views/List/enrichDocsWithVersionStatus.js.map +1 -1
- package/dist/views/List/extractRelationshipDisplayValue.js +15 -14
- package/dist/views/List/extractRelationshipDisplayValue.js.map +1 -1
- package/dist/views/List/extractValueOrRelationshipID.js +16 -15
- package/dist/views/List/extractValueOrRelationshipID.js.map +1 -1
- package/dist/views/List/handleGroupBy.js +133 -150
- package/dist/views/List/handleGroupBy.js.map +1 -1
- package/dist/views/List/handleServerFunction.js +98 -121
- package/dist/views/List/handleServerFunction.js.map +1 -1
- package/dist/views/List/index.js +305 -323
- package/dist/views/List/index.js.map +1 -1
- package/dist/views/List/metadata.js +17 -20
- package/dist/views/List/metadata.js.map +1 -1
- package/dist/views/List/renderListViewSlots.js +82 -75
- package/dist/views/List/renderListViewSlots.js.map +1 -1
- package/dist/views/List/resolveAllFilterOptions.js +43 -45
- package/dist/views/List/resolveAllFilterOptions.js.map +1 -1
- package/dist/views/List/transformColumnsToSelect.js +9 -8
- package/dist/views/List/transformColumnsToSelect.js.map +1 -1
- package/dist/views/Login/LoginField/index.js +57 -89
- package/dist/views/Login/LoginField/index.js.map +1 -1
- package/dist/views/Login/LoginForm/index.js +107 -160
- package/dist/views/Login/LoginForm/index.js.map +1 -1
- package/dist/views/Login/LoginForm/index.scss +10 -0
- package/dist/views/Login/index.js +82 -85
- package/dist/views/Login/index.js.map +1 -1
- package/dist/views/Login/index.scss +10 -0
- package/dist/views/Login/metadata.js +8 -12
- package/dist/views/Login/metadata.js.map +1 -1
- package/dist/views/Logout/LogoutClient.js +84 -120
- package/dist/views/Logout/LogoutClient.js.map +1 -1
- package/dist/views/Logout/index.js +29 -29
- package/dist/views/Logout/index.js.map +1 -1
- package/dist/views/Logout/index.scss +25 -0
- package/dist/views/Logout/metadata.js +7 -11
- package/dist/views/Logout/metadata.js.map +1 -1
- package/dist/views/NotFound/index.client.js +71 -82
- package/dist/views/NotFound/index.client.js.map +1 -1
- package/dist/views/NotFound/index.js +72 -73
- package/dist/views/NotFound/index.js.map +1 -1
- package/dist/views/NotFound/index.scss +57 -0
- package/dist/views/NotFound/metadata.js +7 -9
- package/dist/views/NotFound/metadata.js.map +1 -1
- package/dist/views/ResetPassword/ResetPasswordForm/index.js +97 -108
- package/dist/views/ResetPassword/ResetPasswordForm/index.js.map +1 -1
- package/dist/views/ResetPassword/index.js +93 -73
- package/dist/views/ResetPassword/index.js.map +1 -1
- package/dist/views/ResetPassword/index.scss +11 -0
- package/dist/views/ResetPassword/metadata.js +8 -12
- package/dist/views/ResetPassword/metadata.js.map +1 -1
- package/dist/views/Root/attachViewActions.js +18 -23
- package/dist/views/Root/attachViewActions.js.map +1 -1
- package/dist/views/Root/generateCustomViewMetadata.js +19 -21
- package/dist/views/Root/generateCustomViewMetadata.js.map +1 -1
- package/dist/views/Root/getCustomViewByKey.js +12 -14
- package/dist/views/Root/getCustomViewByKey.js.map +1 -1
- package/dist/views/Root/getCustomViewByRoute.js +31 -42
- package/dist/views/Root/getCustomViewByRoute.js.map +1 -1
- package/dist/views/Root/getDocumentViewInfo.js +24 -23
- package/dist/views/Root/getDocumentViewInfo.js.map +1 -1
- package/dist/views/Root/getRouteData.js +333 -325
- package/dist/views/Root/getRouteData.js.map +1 -1
- package/dist/views/Root/index.js +248 -270
- package/dist/views/Root/index.js.map +1 -1
- package/dist/views/Root/isPathMatchingRoute.js +21 -26
- package/dist/views/Root/isPathMatchingRoute.js.map +1 -1
- package/dist/views/Root/metadata.js +176 -181
- package/dist/views/Root/metadata.js.map +1 -1
- package/dist/views/Unauthorized/index.js +54 -46
- package/dist/views/Unauthorized/index.js.map +1 -1
- package/dist/views/Unauthorized/index.scss +14 -0
- package/dist/views/Unauthorized/metadata.js +8 -12
- package/dist/views/Unauthorized/metadata.js.map +1 -1
- package/dist/views/Verify/index.client.js +25 -43
- package/dist/views/Verify/index.client.js.map +1 -1
- package/dist/views/Verify/index.js +69 -64
- package/dist/views/Verify/index.js.map +1 -1
- package/dist/views/Verify/index.scss +16 -0
- package/dist/views/Verify/metadata.js +8 -12
- package/dist/views/Verify/metadata.js.map +1 -1
- package/dist/views/Version/Default/SelectedLocalesContext.js +4 -4
- package/dist/views/Version/Default/SelectedLocalesContext.js.map +1 -1
- package/dist/views/Version/Default/SetStepNav.js +86 -127
- package/dist/views/Version/Default/SetStepNav.js.map +1 -1
- package/dist/views/Version/Default/index.js +380 -236
- package/dist/views/Version/Default/index.js.map +1 -1
- package/dist/views/Version/Default/index.scss +170 -0
- package/dist/views/Version/Default/types.js +2 -1
- package/dist/views/Version/Default/types.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/DiffCollapser/index.js +102 -119
- package/dist/views/Version/RenderFieldsToDiff/DiffCollapser/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/DiffCollapser/index.scss +81 -0
- package/dist/views/Version/RenderFieldsToDiff/RenderVersionFieldsToDiff.js +78 -73
- package/dist/views/Version/RenderFieldsToDiff/RenderVersionFieldsToDiff.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/buildVersionFields.js +363 -408
- package/dist/views/Version/RenderFieldsToDiff/buildVersionFields.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Collapsible/index.js +40 -51
- package/dist/views/Version/RenderFieldsToDiff/fields/Collapsible/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Date/index.js +35 -67
- package/dist/views/Version/RenderFieldsToDiff/fields/Date/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Date/index.scss +12 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/Group/index.js +59 -56
- package/dist/views/Version/RenderFieldsToDiff/fields/Group/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Group/index.scss +9 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.js +139 -117
- package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.scss +59 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/generateLabelFromValue.js +36 -41
- package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/generateLabelFromValue.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.js +192 -178
- package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.scss +91 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/Row/index.js +17 -11
- package/dist/views/Version/RenderFieldsToDiff/fields/Row/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.js +48 -73
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.scss +4 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.js +132 -143
- package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.scss +9 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.js +56 -81
- package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.scss +4 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/Upload/index.js +252 -210
- package/dist/views/Version/RenderFieldsToDiff/fields/Upload/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Upload/index.scss +121 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/index.js +23 -22
- package/dist/views/Version/RenderFieldsToDiff/fields/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/index.js +12 -9
- package/dist/views/Version/RenderFieldsToDiff/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/index.scss +24 -0
- package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.js +213 -228
- package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.spec.js +1005 -826
- package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.spec.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/utilities/fieldHasChanges.js +2 -1
- package/dist/views/Version/RenderFieldsToDiff/utilities/fieldHasChanges.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/utilities/fieldHasChanges.spec.js +44 -43
- package/dist/views/Version/RenderFieldsToDiff/utilities/fieldHasChanges.spec.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldPathsModified.js +25 -22
- package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldPathsModified.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.js +32 -36
- package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.spec.js +145 -129
- package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.spec.js.map +1 -1
- package/dist/views/Version/Restore/index.js +117 -93
- package/dist/views/Version/Restore/index.js.map +1 -1
- package/dist/views/Version/Restore/index.scss +84 -0
- package/dist/views/Version/SelectComparison/VersionDrawer/CreatedAtCell.js +33 -50
- package/dist/views/Version/SelectComparison/VersionDrawer/CreatedAtCell.js.map +1 -1
- package/dist/views/Version/SelectComparison/VersionDrawer/index.js +170 -226
- package/dist/views/Version/SelectComparison/VersionDrawer/index.js.map +1 -1
- package/dist/views/Version/SelectComparison/VersionDrawer/index.scss +18 -0
- package/dist/views/Version/SelectComparison/index.js +73 -50
- package/dist/views/Version/SelectComparison/index.js.map +1 -1
- package/dist/views/Version/SelectComparison/index.scss +9 -0
- package/dist/views/Version/SelectComparison/types.js +2 -1
- package/dist/views/Version/SelectComparison/types.js.map +1 -1
- package/dist/views/Version/SelectLocales/index.js +34 -32
- package/dist/views/Version/SelectLocales/index.js.map +1 -1
- package/dist/views/Version/VersionPillLabel/VersionPillLabel.js +104 -95
- package/dist/views/Version/VersionPillLabel/VersionPillLabel.js.map +1 -1
- package/dist/views/Version/VersionPillLabel/getVersionLabel.js +23 -27
- package/dist/views/Version/VersionPillLabel/getVersionLabel.js.map +1 -1
- package/dist/views/Version/VersionPillLabel/index.scss +26 -0
- package/dist/views/Version/fetchVersions.js +113 -138
- package/dist/views/Version/fetchVersions.js.map +1 -1
- package/dist/views/Version/index.js +325 -323
- package/dist/views/Version/index.js.map +1 -1
- package/dist/views/Version/metadata.js +43 -50
- package/dist/views/Version/metadata.js.map +1 -1
- package/dist/views/Versions/buildColumns.js +95 -79
- package/dist/views/Versions/buildColumns.js.map +1 -1
- package/dist/views/Versions/cells/AutosaveCell/index.js +34 -38
- package/dist/views/Versions/cells/AutosaveCell/index.js.map +1 -1
- package/dist/views/Versions/cells/AutosaveCell/index.scss +9 -0
- package/dist/views/Versions/cells/CreatedAt/index.js +32 -53
- package/dist/views/Versions/cells/CreatedAt/index.js.map +1 -1
- package/dist/views/Versions/cells/ID/index.js +10 -8
- package/dist/views/Versions/cells/ID/index.js.map +1 -1
- package/dist/views/Versions/index.client.js +106 -83
- package/dist/views/Versions/index.client.js.map +1 -1
- package/dist/views/Versions/index.js +143 -143
- package/dist/views/Versions/index.js.map +1 -1
- package/dist/views/Versions/index.scss +110 -0
- package/dist/views/Versions/metadata.js +37 -44
- package/dist/views/Versions/metadata.js.map +1 -1
- package/dist/views/Versions/types.js +2 -1
- package/dist/views/Versions/types.js.map +1 -1
- package/dist/withPayload/withPayload.js +198 -143
- package/dist/withPayload/withPayload.js.map +1 -1
- package/dist/withPayload/withPayload.utils.js +92 -95
- package/dist/withPayload/withPayload.utils.js.map +1 -1
- package/dist/withPayload/withPayloadLegacy.js +42 -40
- package/dist/withPayload/withPayloadLegacy.js.map +1 -1
- package/package.json +7 -7
|
@@ -1,179 +1,145 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
import { c as _c } from "react/compiler-runtime";
|
|
4
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
|
|
5
3
|
import { EmailField, Form, FormSubmit, TextField, useConfig, useTranslation } from '@payloadcms/ui';
|
|
6
4
|
import { email, text } from 'payload/shared';
|
|
7
5
|
import React, { useState } from 'react';
|
|
8
6
|
import { FormHeader } from '../../../elements/FormHeader/index.js';
|
|
9
|
-
export const ForgotPasswordForm = ()
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
admin: t0,
|
|
17
|
-
routes: t1
|
|
18
|
-
} = config;
|
|
19
|
-
const {
|
|
20
|
-
user: userSlug
|
|
21
|
-
} = t0;
|
|
22
|
-
const {
|
|
23
|
-
api
|
|
24
|
-
} = t1;
|
|
25
|
-
const {
|
|
26
|
-
t
|
|
27
|
-
} = useTranslation();
|
|
28
|
-
const [hasSubmitted, setHasSubmitted] = useState(false);
|
|
29
|
-
let t2;
|
|
30
|
-
if ($[0] !== getEntityConfig || $[1] !== userSlug) {
|
|
31
|
-
t2 = getEntityConfig({
|
|
32
|
-
collectionSlug: userSlug
|
|
7
|
+
export const ForgotPasswordForm = ()=>{
|
|
8
|
+
const { config, getEntityConfig } = useConfig();
|
|
9
|
+
const { admin: { user: userSlug }, routes: { api } } = config;
|
|
10
|
+
const { t } = useTranslation();
|
|
11
|
+
const [hasSubmitted, setHasSubmitted] = useState(false);
|
|
12
|
+
const collectionConfig = getEntityConfig({
|
|
13
|
+
collectionSlug: userSlug
|
|
33
14
|
});
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
let t3;
|
|
43
|
-
if ($[3] !== loginWithUsername || $[4] !== t) {
|
|
44
|
-
t3 = (res, successToast, errorToast) => {
|
|
45
|
-
res.json().then(() => {
|
|
46
|
-
setHasSubmitted(true);
|
|
47
|
-
successToast(t("general:submissionSuccessful"));
|
|
48
|
-
}).catch(() => {
|
|
49
|
-
errorToast(loginWithUsername ? t("authentication:usernameNotValid") : t("authentication:emailNotValid"));
|
|
50
|
-
});
|
|
15
|
+
const loginWithUsername = collectionConfig?.auth?.loginWithUsername;
|
|
16
|
+
const handleResponse = (res, successToast, errorToast)=>{
|
|
17
|
+
res.json().then(()=>{
|
|
18
|
+
setHasSubmitted(true);
|
|
19
|
+
successToast(t('general:submissionSuccessful'));
|
|
20
|
+
}).catch(()=>{
|
|
21
|
+
errorToast(loginWithUsername ? t('authentication:usernameNotValid') : t('authentication:emailNotValid'));
|
|
22
|
+
});
|
|
51
23
|
};
|
|
52
|
-
|
|
53
|
-
$[4] = t;
|
|
54
|
-
$[5] = t3;
|
|
55
|
-
} else {
|
|
56
|
-
t3 = $[5];
|
|
57
|
-
}
|
|
58
|
-
const handleResponse = t3;
|
|
59
|
-
let t4;
|
|
60
|
-
let t5;
|
|
61
|
-
if ($[6] !== api || $[7] !== config || $[8] !== handleResponse || $[9] !== hasSubmitted || $[10] !== loginWithUsername || $[11] !== t || $[12] !== userSlug) {
|
|
62
|
-
t5 = Symbol.for("react.early_return_sentinel");
|
|
63
|
-
bb0: {
|
|
64
|
-
const initialState = loginWithUsername ? {
|
|
24
|
+
const initialState = loginWithUsername ? {
|
|
65
25
|
username: {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
26
|
+
initialValue: '',
|
|
27
|
+
valid: true,
|
|
28
|
+
value: undefined
|
|
69
29
|
}
|
|
70
|
-
|
|
30
|
+
} : {
|
|
71
31
|
email: {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
if (hasSubmitted) {
|
|
78
|
-
let t6;
|
|
79
|
-
if ($[15] !== t) {
|
|
80
|
-
t6 = _jsx(FormHeader, {
|
|
81
|
-
description: t("authentication:checkYourEmailForPasswordReset"),
|
|
82
|
-
heading: t("authentication:emailSent")
|
|
83
|
-
});
|
|
84
|
-
$[15] = t;
|
|
85
|
-
$[16] = t6;
|
|
86
|
-
} else {
|
|
87
|
-
t6 = $[16];
|
|
32
|
+
initialValue: '',
|
|
33
|
+
valid: true,
|
|
34
|
+
value: undefined
|
|
88
35
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
36
|
+
};
|
|
37
|
+
if (hasSubmitted) {
|
|
38
|
+
return /*#__PURE__*/ _jsxDEV(FormHeader, {
|
|
39
|
+
description: t('authentication:checkYourEmailForPasswordReset'),
|
|
40
|
+
heading: t('authentication:emailSent')
|
|
41
|
+
}, void 0, false, {
|
|
42
|
+
fileName: "src/views/ForgotPassword/ForgotPasswordForm/index.tsx",
|
|
43
|
+
lineNumber: 59,
|
|
44
|
+
columnNumber: 7
|
|
45
|
+
}, this);
|
|
46
|
+
}
|
|
47
|
+
return /*#__PURE__*/ _jsxDEV(Form, {
|
|
93
48
|
action: `${api}/${userSlug}/forgot-password`,
|
|
94
|
-
handleResponse,
|
|
95
|
-
initialState,
|
|
49
|
+
handleResponse: handleResponse,
|
|
50
|
+
initialState: initialState,
|
|
96
51
|
method: "POST",
|
|
97
|
-
children: [
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
52
|
+
children: [
|
|
53
|
+
/*#__PURE__*/ _jsxDEV(FormHeader, {
|
|
54
|
+
description: loginWithUsername ? t('authentication:forgotPasswordUsernameInstructions') : t('authentication:forgotPasswordEmailInstructions'),
|
|
55
|
+
heading: t('authentication:forgotPassword')
|
|
56
|
+
}, void 0, false, {
|
|
57
|
+
fileName: "src/views/ForgotPassword/ForgotPasswordForm/index.tsx",
|
|
58
|
+
lineNumber: 73,
|
|
59
|
+
columnNumber: 7
|
|
60
|
+
}, this),
|
|
61
|
+
loginWithUsername ? /*#__PURE__*/ _jsxDEV(TextField, {
|
|
62
|
+
field: {
|
|
63
|
+
name: 'username',
|
|
64
|
+
label: t('authentication:username'),
|
|
65
|
+
required: true
|
|
66
|
+
},
|
|
67
|
+
path: "username",
|
|
68
|
+
validate: (value)=>text(value, {
|
|
69
|
+
name: 'username',
|
|
70
|
+
type: 'text',
|
|
71
|
+
blockData: {},
|
|
72
|
+
data: {},
|
|
73
|
+
event: 'onChange',
|
|
74
|
+
path: [
|
|
75
|
+
'username'
|
|
76
|
+
],
|
|
77
|
+
preferences: {
|
|
78
|
+
fields: {}
|
|
79
|
+
},
|
|
80
|
+
req: {
|
|
81
|
+
payload: {
|
|
82
|
+
config
|
|
83
|
+
},
|
|
84
|
+
t
|
|
85
|
+
},
|
|
86
|
+
required: true,
|
|
87
|
+
siblingData: {}
|
|
88
|
+
})
|
|
89
|
+
}, void 0, false, {
|
|
90
|
+
fileName: "src/views/ForgotPassword/ForgotPasswordForm/index.tsx",
|
|
91
|
+
lineNumber: 83,
|
|
92
|
+
columnNumber: 9
|
|
93
|
+
}, this) : /*#__PURE__*/ _jsxDEV(EmailField, {
|
|
94
|
+
field: {
|
|
95
|
+
name: 'email',
|
|
96
|
+
admin: {
|
|
97
|
+
autoComplete: 'email'
|
|
98
|
+
},
|
|
99
|
+
label: t('general:email'),
|
|
100
|
+
required: true
|
|
101
|
+
},
|
|
102
|
+
path: "email",
|
|
103
|
+
validate: (value)=>email(value, {
|
|
104
|
+
name: 'email',
|
|
105
|
+
type: 'email',
|
|
106
|
+
blockData: {},
|
|
107
|
+
data: {},
|
|
108
|
+
event: 'onChange',
|
|
109
|
+
path: [
|
|
110
|
+
'email'
|
|
111
|
+
],
|
|
112
|
+
preferences: {
|
|
113
|
+
fields: {}
|
|
114
|
+
},
|
|
115
|
+
req: {
|
|
116
|
+
payload: {
|
|
117
|
+
config
|
|
118
|
+
},
|
|
119
|
+
t
|
|
120
|
+
},
|
|
121
|
+
required: true,
|
|
122
|
+
siblingData: {}
|
|
123
|
+
})
|
|
124
|
+
}, void 0, false, {
|
|
125
|
+
fileName: "src/views/ForgotPassword/ForgotPasswordForm/index.tsx",
|
|
126
|
+
lineNumber: 111,
|
|
127
|
+
columnNumber: 9
|
|
128
|
+
}, this),
|
|
129
|
+
/*#__PURE__*/ _jsxDEV(FormSubmit, {
|
|
130
|
+
size: "large",
|
|
131
|
+
children: t('general:submit')
|
|
132
|
+
}, void 0, false, {
|
|
133
|
+
fileName: "src/views/ForgotPassword/ForgotPasswordForm/index.tsx",
|
|
134
|
+
lineNumber: 137,
|
|
135
|
+
columnNumber: 7
|
|
136
|
+
}, this)
|
|
137
|
+
]
|
|
138
|
+
}, void 0, true, {
|
|
139
|
+
fileName: "src/views/ForgotPassword/ForgotPasswordForm/index.tsx",
|
|
140
|
+
lineNumber: 67,
|
|
141
|
+
columnNumber: 5
|
|
142
|
+
}, this);
|
|
178
143
|
};
|
|
144
|
+
|
|
179
145
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../../src/views/ForgotPassword/ForgotPasswordForm/index.tsx"],"sourcesContent":["'use client'\n\nimport type { FormProps } from '@payloadcms/ui'\nimport type { FormState, PayloadRequest } from 'payload'\n\nimport { EmailField, Form, FormSubmit, TextField, useConfig, useTranslation } from '@payloadcms/ui'\nimport { email, text } from 'payload/shared'\nimport React, { useState } from 'react'\n\nimport { FormHeader } from '../../../elements/FormHeader/index.js'\n\nexport const ForgotPasswordForm: React.FC = () => {\n const { config, getEntityConfig } = useConfig()\n\n const {\n admin: { user: userSlug },\n routes: { api },\n } = config\n\n const { t } = useTranslation()\n const [hasSubmitted, setHasSubmitted] = useState(false)\n const collectionConfig = getEntityConfig({ collectionSlug: userSlug })\n const loginWithUsername = collectionConfig?.auth?.loginWithUsername\n\n const handleResponse: FormProps['handleResponse'] = (res, successToast, errorToast) => {\n res\n .json()\n .then(() => {\n setHasSubmitted(true)\n successToast(t('general:submissionSuccessful'))\n })\n .catch(() => {\n errorToast(\n loginWithUsername\n ? t('authentication:usernameNotValid')\n : t('authentication:emailNotValid'),\n )\n })\n }\n\n const initialState: FormState = loginWithUsername\n ? {\n username: {\n initialValue: '',\n valid: true,\n value: undefined,\n },\n }\n : {\n email: {\n initialValue: '',\n valid: true,\n value: undefined,\n },\n }\n\n if (hasSubmitted) {\n return (\n <FormHeader\n description={t('authentication:checkYourEmailForPasswordReset')}\n heading={t('authentication:emailSent')}\n />\n )\n }\n\n return (\n <Form\n action={`${api}/${userSlug}/forgot-password`}\n handleResponse={handleResponse}\n initialState={initialState}\n method=\"POST\"\n >\n <FormHeader\n description={\n loginWithUsername\n ? t('authentication:forgotPasswordUsernameInstructions')\n : t('authentication:forgotPasswordEmailInstructions')\n }\n heading={t('authentication:forgotPassword')}\n />\n\n {loginWithUsername ? (\n <TextField\n field={{\n name: 'username',\n label: t('authentication:username'),\n required: true,\n }}\n path=\"username\"\n validate={(value) =>\n text(value, {\n name: 'username',\n type: 'text',\n blockData: {},\n data: {},\n event: 'onChange',\n path: ['username'],\n preferences: { fields: {} },\n req: {\n payload: {\n config,\n },\n t,\n } as unknown as PayloadRequest,\n required: true,\n siblingData: {},\n })\n }\n />\n ) : (\n <EmailField\n field={{\n name: 'email',\n admin: {\n autoComplete: 'email',\n },\n label: t('general:email'),\n required: true,\n }}\n path=\"email\"\n validate={(value) =>\n email(value, {\n name: 'email',\n type: 'email',\n blockData: {},\n data: {},\n event: 'onChange',\n path: ['email'],\n preferences: { fields: {} },\n req: { payload: { config }, t } as unknown as PayloadRequest,\n required: true,\n siblingData: {},\n })\n }\n />\n )}\n <FormSubmit size=\"large\">{t('general:submit')}</FormSubmit>\n </Form>\n )\n}\n"],"names":["EmailField","Form","FormSubmit","TextField","useConfig","useTranslation","email","text","React","useState","FormHeader","ForgotPasswordForm","config","getEntityConfig","admin","user","userSlug","routes","api","t","hasSubmitted","setHasSubmitted","collectionConfig","collectionSlug","loginWithUsername","auth","handleResponse","res","successToast","errorToast","json","then","catch","initialState","username","initialValue","valid","value","undefined","description","heading","action","method","field","name","label","required","path","validate","type","blockData","data","event","preferences","fields","req","payload","siblingData","autoComplete","size"],"mappings":"AAAA;;AAKA,SAASA,UAAU,EAAEC,IAAI,EAAEC,UAAU,EAAEC,SAAS,EAAEC,SAAS,EAAEC,cAAc,QAAQ,iBAAgB;AACnG,SAASC,KAAK,EAAEC,IAAI,QAAQ,iBAAgB;AAC5C,OAAOC,SAASC,QAAQ,QAAQ,QAAO;AAEvC,SAASC,UAAU,QAAQ,wCAAuC;AAElE,OAAO,MAAMC,qBAA+B;IAC1C,MAAM,EAAEC,MAAM,EAAEC,eAAe,EAAE,GAAGT;IAEpC,MAAM,EACJU,OAAO,EAAEC,MAAMC,QAAQ,EAAE,EACzBC,QAAQ,EAAEC,GAAG,EAAE,EAChB,GAAGN;IAEJ,MAAM,EAAEO,CAAC,EAAE,GAAGd;IACd,MAAM,CAACe,cAAcC,gBAAgB,GAAGZ,SAAS;IACjD,MAAMa,mBAAmBT,gBAAgB;QAAEU,gBAAgBP;IAAS;IACpE,MAAMQ,oBAAoBF,kBAAkBG,MAAMD;IAElD,MAAME,iBAA8C,CAACC,KAAKC,cAAcC;QACtEF,IACGG,IAAI,GACJC,IAAI,CAAC;YACJV,gBAAgB;YAChBO,aAAaT,EAAE;QACjB,GACCa,KAAK,CAAC;YACLH,WACEL,oBACIL,EAAE,qCACFA,EAAE;QAEV;IACJ;IAEA,MAAMc,eAA0BT,oBAC5B;QACEU,UAAU;YACRC,cAAc;YACdC,OAAO;YACPC,OAAOC;QACT;IACF,IACA;QACEhC,OAAO;YACL6B,cAAc;YACdC,OAAO;YACPC,OAAOC;QACT;IACF;IAEJ,IAAIlB,cAAc;QAChB,qBACE,QAACV;YACC6B,aAAapB,EAAE;YACfqB,SAASrB,EAAE;;;;;;IAGjB;IAEA,qBACE,QAAClB;QACCwC,QAAQ,GAAGvB,IAAI,CAAC,EAAEF,SAAS,gBAAgB,CAAC;QAC5CU,gBAAgBA;QAChBO,cAAcA;QACdS,QAAO;;0BAEP,QAAChC;gBACC6B,aACEf,oBACIL,EAAE,uDACFA,EAAE;gBAERqB,SAASrB,EAAE;;;;;;YAGZK,kCACC,QAACrB;gBACCwC,OAAO;oBACLC,MAAM;oBACNC,OAAO1B,EAAE;oBACT2B,UAAU;gBACZ;gBACAC,MAAK;gBACLC,UAAU,CAACX,QACT9B,KAAK8B,OAAO;wBACVO,MAAM;wBACNK,MAAM;wBACNC,WAAW,CAAC;wBACZC,MAAM,CAAC;wBACPC,OAAO;wBACPL,MAAM;4BAAC;yBAAW;wBAClBM,aAAa;4BAAEC,QAAQ,CAAC;wBAAE;wBAC1BC,KAAK;4BACHC,SAAS;gCACP5C;4BACF;4BACAO;wBACF;wBACA2B,UAAU;wBACVW,aAAa,CAAC;oBAChB;;;;;qCAIJ,QAACzD;gBACC2C,OAAO;oBACLC,MAAM;oBACN9B,OAAO;wBACL4C,cAAc;oBAChB;oBACAb,OAAO1B,EAAE;oBACT2B,UAAU;gBACZ;gBACAC,MAAK;gBACLC,UAAU,CAACX,QACT/B,MAAM+B,OAAO;wBACXO,MAAM;wBACNK,MAAM;wBACNC,WAAW,CAAC;wBACZC,MAAM,CAAC;wBACPC,OAAO;wBACPL,MAAM;4BAAC;yBAAQ;wBACfM,aAAa;4BAAEC,QAAQ,CAAC;wBAAE;wBAC1BC,KAAK;4BAAEC,SAAS;gCAAE5C;4BAAO;4BAAGO;wBAAE;wBAC9B2B,UAAU;wBACVW,aAAa,CAAC;oBAChB;;;;;;0BAIN,QAACvD;gBAAWyD,MAAK;0BAASxC,EAAE;;;;;;;;;;;;AAGlC,EAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
|
|
2
2
|
import { Button, Link } from '@payloadcms/ui';
|
|
3
3
|
import { Translation } from '@payloadcms/ui/shared';
|
|
4
4
|
import { formatAdminURL } from 'payload/shared';
|
|
@@ -6,67 +6,84 @@ import React, { Fragment } from 'react';
|
|
|
6
6
|
import { FormHeader } from '../../elements/FormHeader/index.js';
|
|
7
7
|
import { ForgotPasswordForm } from './ForgotPasswordForm/index.js';
|
|
8
8
|
export const forgotPasswordBaseClass = 'forgot-password';
|
|
9
|
-
export function ForgotPasswordView({
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
export function ForgotPasswordView({ initPageResult }) {
|
|
10
|
+
const { req: { i18n, payload: { config }, user } } = initPageResult;
|
|
11
|
+
const { admin: { routes: { account: accountRoute, login: loginRoute } }, routes: { admin: adminRoute } } = config;
|
|
12
|
+
if (user) {
|
|
13
|
+
return /*#__PURE__*/ _jsxDEV(Fragment, {
|
|
14
|
+
children: [
|
|
15
|
+
/*#__PURE__*/ _jsxDEV(FormHeader, {
|
|
16
|
+
description: /*#__PURE__*/ _jsxDEV(Translation, {
|
|
17
|
+
elements: {
|
|
18
|
+
'0': ({ children })=>/*#__PURE__*/ _jsxDEV(Link, {
|
|
19
|
+
href: formatAdminURL({
|
|
20
|
+
adminRoute,
|
|
21
|
+
path: accountRoute
|
|
22
|
+
}),
|
|
23
|
+
prefetch: false,
|
|
24
|
+
children: children
|
|
25
|
+
}, void 0, false, {
|
|
26
|
+
fileName: "src/views/ForgotPassword/index.tsx",
|
|
27
|
+
lineNumber: 37,
|
|
28
|
+
columnNumber: 19
|
|
29
|
+
}, void 0)
|
|
30
|
+
},
|
|
31
|
+
i18nKey: "authentication:loggedInChangePassword",
|
|
32
|
+
t: i18n.t
|
|
33
|
+
}, void 0, false, {
|
|
34
|
+
fileName: "src/views/ForgotPassword/index.tsx",
|
|
35
|
+
lineNumber: 34,
|
|
36
|
+
columnNumber: 13
|
|
37
|
+
}, void 0),
|
|
38
|
+
heading: i18n.t('authentication:alreadyLoggedIn')
|
|
39
|
+
}, void 0, false, {
|
|
40
|
+
fileName: "src/views/ForgotPassword/index.tsx",
|
|
41
|
+
lineNumber: 32,
|
|
42
|
+
columnNumber: 9
|
|
43
|
+
}, this),
|
|
44
|
+
/*#__PURE__*/ _jsxDEV(Button, {
|
|
45
|
+
buttonStyle: "secondary",
|
|
46
|
+
el: "link",
|
|
47
|
+
size: "large",
|
|
48
|
+
to: adminRoute,
|
|
49
|
+
children: i18n.t('general:backToDashboard')
|
|
50
|
+
}, void 0, false, {
|
|
51
|
+
fileName: "src/views/ForgotPassword/index.tsx",
|
|
52
|
+
lineNumber: 54,
|
|
53
|
+
columnNumber: 9
|
|
54
|
+
}, this)
|
|
55
|
+
]
|
|
56
|
+
}, void 0, true, {
|
|
57
|
+
fileName: "src/views/ForgotPassword/index.tsx",
|
|
58
|
+
lineNumber: 31,
|
|
59
|
+
columnNumber: 7
|
|
60
|
+
}, this);
|
|
19
61
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
children: children
|
|
46
|
-
})
|
|
47
|
-
},
|
|
48
|
-
i18nKey: "authentication:loggedInChangePassword",
|
|
49
|
-
t: i18n.t
|
|
50
|
-
}),
|
|
51
|
-
heading: i18n.t('authentication:alreadyLoggedIn')
|
|
52
|
-
}), /*#__PURE__*/_jsx(Button, {
|
|
53
|
-
buttonStyle: "secondary",
|
|
54
|
-
el: "link",
|
|
55
|
-
size: "large",
|
|
56
|
-
to: adminRoute,
|
|
57
|
-
children: i18n.t('general:backToDashboard')
|
|
58
|
-
})]
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
return /*#__PURE__*/_jsxs(Fragment, {
|
|
62
|
-
children: [/*#__PURE__*/_jsx(ForgotPasswordForm, {}), /*#__PURE__*/_jsx(Link, {
|
|
63
|
-
href: formatAdminURL({
|
|
64
|
-
adminRoute,
|
|
65
|
-
path: loginRoute
|
|
66
|
-
}),
|
|
67
|
-
prefetch: false,
|
|
68
|
-
children: i18n.t('authentication:backToLogin')
|
|
69
|
-
})]
|
|
70
|
-
});
|
|
62
|
+
return /*#__PURE__*/ _jsxDEV(Fragment, {
|
|
63
|
+
children: [
|
|
64
|
+
/*#__PURE__*/ _jsxDEV(ForgotPasswordForm, {}, void 0, false, {
|
|
65
|
+
fileName: "src/views/ForgotPassword/index.tsx",
|
|
66
|
+
lineNumber: 63,
|
|
67
|
+
columnNumber: 7
|
|
68
|
+
}, this),
|
|
69
|
+
/*#__PURE__*/ _jsxDEV(Link, {
|
|
70
|
+
href: formatAdminURL({
|
|
71
|
+
adminRoute,
|
|
72
|
+
path: loginRoute
|
|
73
|
+
}),
|
|
74
|
+
prefetch: false,
|
|
75
|
+
children: i18n.t('authentication:backToLogin')
|
|
76
|
+
}, void 0, false, {
|
|
77
|
+
fileName: "src/views/ForgotPassword/index.tsx",
|
|
78
|
+
lineNumber: 64,
|
|
79
|
+
columnNumber: 7
|
|
80
|
+
}, this)
|
|
81
|
+
]
|
|
82
|
+
}, void 0, true, {
|
|
83
|
+
fileName: "src/views/ForgotPassword/index.tsx",
|
|
84
|
+
lineNumber: 62,
|
|
85
|
+
columnNumber: 5
|
|
86
|
+
}, this);
|
|
71
87
|
}
|
|
88
|
+
|
|
72
89
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../src/views/ForgotPassword/index.tsx"],"sourcesContent":["import type { AdminViewServerProps } from 'payload'\n\nimport { Button, Link } from '@payloadcms/ui'\nimport { Translation } from '@payloadcms/ui/shared'\nimport { formatAdminURL } from 'payload/shared'\nimport React, { Fragment } from 'react'\n\nimport { FormHeader } from '../../elements/FormHeader/index.js'\nimport { ForgotPasswordForm } from './ForgotPasswordForm/index.js'\n\nexport const forgotPasswordBaseClass = 'forgot-password'\n\nexport function ForgotPasswordView({ initPageResult }: AdminViewServerProps) {\n const {\n req: {\n i18n,\n payload: { config },\n user,\n },\n } = initPageResult\n\n const {\n admin: {\n routes: { account: accountRoute, login: loginRoute },\n },\n routes: { admin: adminRoute },\n } = config\n\n if (user) {\n return (\n <Fragment>\n <FormHeader\n description={\n <Translation\n elements={{\n '0': ({ children }) => (\n <Link\n href={formatAdminURL({\n adminRoute,\n path: accountRoute,\n })}\n prefetch={false}\n >\n {children}\n </Link>\n ),\n }}\n i18nKey=\"authentication:loggedInChangePassword\"\n t={i18n.t}\n />\n }\n heading={i18n.t('authentication:alreadyLoggedIn')}\n />\n <Button buttonStyle=\"secondary\" el=\"link\" size=\"large\" to={adminRoute}>\n {i18n.t('general:backToDashboard')}\n </Button>\n </Fragment>\n )\n }\n\n return (\n <Fragment>\n <ForgotPasswordForm />\n <Link\n href={formatAdminURL({\n adminRoute,\n path: loginRoute,\n })}\n prefetch={false}\n >\n {i18n.t('authentication:backToLogin')}\n </Link>\n </Fragment>\n )\n}\n"],"names":["Button","Link","Translation","formatAdminURL","React","Fragment","FormHeader","ForgotPasswordForm","forgotPasswordBaseClass","ForgotPasswordView","initPageResult","req","i18n","payload","config","user","admin","routes","account","accountRoute","login","loginRoute","adminRoute","description","elements","children","href","path","prefetch","i18nKey","t","heading","buttonStyle","el","size","to"],"mappings":";AAEA,SAASA,MAAM,EAAEC,IAAI,QAAQ,iBAAgB;AAC7C,SAASC,WAAW,QAAQ,wBAAuB;AACnD,SAASC,cAAc,QAAQ,iBAAgB;AAC/C,OAAOC,SAASC,QAAQ,QAAQ,QAAO;AAEvC,SAASC,UAAU,QAAQ,qCAAoC;AAC/D,SAASC,kBAAkB,QAAQ,gCAA+B;AAElE,OAAO,MAAMC,0BAA0B,kBAAiB;AAExD,OAAO,SAASC,mBAAmB,EAAEC,cAAc,EAAwB;IACzE,MAAM,EACJC,KAAK,EACHC,IAAI,EACJC,SAAS,EAAEC,MAAM,EAAE,EACnBC,IAAI,EACL,EACF,GAAGL;IAEJ,MAAM,EACJM,OAAO,EACLC,QAAQ,EAAEC,SAASC,YAAY,EAAEC,OAAOC,UAAU,EAAE,EACrD,EACDJ,QAAQ,EAAED,OAAOM,UAAU,EAAE,EAC9B,GAAGR;IAEJ,IAAIC,MAAM;QACR,qBACE,QAACV;;8BACC,QAACC;oBACCiB,2BACE,QAACrB;wBACCsB,UAAU;4BACR,KAAK,CAAC,EAAEC,QAAQ,EAAE,iBAChB,QAACxB;oCACCyB,MAAMvB,eAAe;wCACnBmB;wCACAK,MAAMR;oCACR;oCACAS,UAAU;8CAETH;;;;;;wBAGP;wBACAI,SAAQ;wBACRC,GAAGlB,KAAKkB,CAAC;;;;;;oBAGbC,SAASnB,KAAKkB,CAAC,CAAC;;;;;;8BAElB,QAAC9B;oBAAOgC,aAAY;oBAAYC,IAAG;oBAAOC,MAAK;oBAAQC,IAAIb;8BACxDV,KAAKkB,CAAC,CAAC;;;;;;;;;;;;IAIhB;IAEA,qBACE,QAACzB;;0BACC,QAACE;;;;;0BACD,QAACN;gBACCyB,MAAMvB,eAAe;oBACnBmB;oBACAK,MAAMN;gBACR;gBACAO,UAAU;0BAEThB,KAAKkB,CAAC,CAAC;;;;;;;;;;;;AAIhB"}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import { generateMetadata } from '../../utilities/meta.js';
|
|
2
|
-
export const generateForgotPasswordViewMetadata = async ({
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
title: t('authentication:forgotPassword'),
|
|
11
|
-
...(config.admin.meta || {}),
|
|
12
|
-
serverURL: config.serverURL
|
|
13
|
-
});
|
|
2
|
+
export const generateForgotPasswordViewMetadata = async ({ config, i18n: { t } })=>generateMetadata({
|
|
3
|
+
description: t('authentication:forgotPassword'),
|
|
4
|
+
keywords: t('authentication:forgotPassword'),
|
|
5
|
+
title: t('authentication:forgotPassword'),
|
|
6
|
+
...config.admin.meta || {},
|
|
7
|
+
serverURL: config.serverURL
|
|
8
|
+
});
|
|
9
|
+
|
|
14
10
|
//# sourceMappingURL=metadata.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../src/views/ForgotPassword/metadata.ts"],"sourcesContent":["import type { GenerateViewMetadata } from '../Root/index.js'\n\nimport { generateMetadata } from '../../utilities/meta.js'\n\nexport const generateForgotPasswordViewMetadata: GenerateViewMetadata = async ({\n config,\n i18n: { t },\n}) =>\n generateMetadata({\n description: t('authentication:forgotPassword'),\n keywords: t('authentication:forgotPassword'),\n title: t('authentication:forgotPassword'),\n ...(config.admin.meta || {}),\n serverURL: config.serverURL,\n })\n"],"names":["generateMetadata","generateForgotPasswordViewMetadata","config","i18n","t","description","keywords","title","admin","meta","serverURL"],"mappings":"AAEA,SAASA,gBAAgB,QAAQ,0BAAyB;AAE1D,OAAO,MAAMC,qCAA2D,OAAO,EAC7EC,MAAM,EACNC,MAAM,EAAEC,CAAC,EAAE,EACZ,GACCJ,iBAAiB;QACfK,aAAaD,EAAE;QACfE,UAAUF,EAAE;QACZG,OAAOH,EAAE;QACT,GAAIF,OAAOM,KAAK,CAACC,IAAI,IAAI,CAAC,CAAC;QAC3BC,WAAWR,OAAOQ,SAAS;IAC7B,GAAE"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
// Helper function to create serializable value for client components
|
|
2
|
-
export const createSerializableValue = value
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
export const createSerializableValue = (value)=>{
|
|
3
|
+
if (value === null || value === undefined) {
|
|
4
|
+
return 'null';
|
|
5
|
+
}
|
|
6
|
+
if (typeof value === 'object' && value?.relationTo && value?.value) {
|
|
7
|
+
return `${value.relationTo}:${value.value}`;
|
|
8
|
+
}
|
|
9
|
+
if (typeof value === 'object' && value?.id) {
|
|
10
|
+
return String(value.id);
|
|
11
|
+
}
|
|
12
|
+
return String(value);
|
|
13
13
|
};
|
|
14
|
+
|
|
14
15
|
//# sourceMappingURL=createSerializableValue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../src/views/List/createSerializableValue.ts"],"sourcesContent":["// Helper function to create serializable value for client components\nexport const createSerializableValue = (value: any): string => {\n if (value === null || value === undefined) {\n return 'null'\n }\n if (typeof value === 'object' && value?.relationTo && value?.value) {\n return `${value.relationTo}:${value.value}`\n }\n if (typeof value === 'object' && value?.id) {\n return String(value.id)\n }\n return String(value)\n}\n"],"names":["createSerializableValue","value","undefined","relationTo","id","String"],"mappings":"AAAA,qEAAqE;AACrE,OAAO,MAAMA,0BAA0B,CAACC;IACtC,IAAIA,UAAU,QAAQA,UAAUC,WAAW;QACzC,OAAO;IACT;IACA,IAAI,OAAOD,UAAU,YAAYA,OAAOE,cAAcF,OAAOA,OAAO;QAClE,OAAO,GAAGA,MAAME,UAAU,CAAC,CAAC,EAAEF,MAAMA,KAAK,EAAE;IAC7C;IACA,IAAI,OAAOA,UAAU,YAAYA,OAAOG,IAAI;QAC1C,OAAOC,OAAOJ,MAAMG,EAAE;IACxB;IACA,OAAOC,OAAOJ;AAChB,EAAC"}
|