@payloadcms/next 3.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/index.d.ts +2 -0
- package/dist/bin/index.d.ts.map +1 -0
- package/dist/bin/index.js +37 -0
- package/dist/bin/install.d.ts +4 -0
- package/dist/bin/install.d.ts.map +1 -0
- package/dist/bin/install.js +77 -0
- package/dist/config.d.ts +4 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +13 -0
- package/dist/elements/LeaveWithoutSaving/index.d.ts +4 -0
- package/dist/elements/LeaveWithoutSaving/index.d.ts.map +1 -0
- package/dist/elements/LeaveWithoutSaving/index.js +122 -0
- package/dist/elements/LeaveWithoutSaving/index.scss +36 -0
- package/dist/elements/LeaveWithoutSaving/usePreventLeave.d.ts +8 -0
- package/dist/elements/LeaveWithoutSaving/usePreventLeave.d.ts.map +1 -0
- package/dist/elements/LeaveWithoutSaving/usePreventLeave.js +132 -0
- package/dist/exports/index.d.ts +2 -0
- package/dist/exports/index.d.ts.map +1 -0
- package/dist/exports/index.js +13 -0
- package/dist/graphql/registerSchema.d.ts +2 -0
- package/dist/graphql/registerSchema.d.ts.map +1 -0
- package/dist/graphql/registerSchema.js +3 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/layouts/Admin/index.d.ts +12 -0
- package/dist/layouts/Admin/index.d.ts.map +1 -0
- package/dist/layouts/Admin/index.js +44 -0
- package/dist/layouts/Document/index.d.ts +14 -0
- package/dist/layouts/Document/index.d.ts.map +1 -0
- package/dist/layouts/Document/index.js +82 -0
- package/dist/layouts/Root/index.d.ts +12 -0
- package/dist/layouts/Root/index.d.ts.map +1 -0
- package/dist/layouts/Root/index.js +92 -0
- package/dist/next-fileupload/fileFactory.d.ts +16 -0
- package/dist/next-fileupload/fileFactory.d.ts.map +1 -0
- package/dist/next-fileupload/fileFactory.js +53 -0
- package/dist/next-fileupload/handlers.d.ts +15 -0
- package/dist/next-fileupload/handlers.d.ts.map +1 -0
- package/dist/next-fileupload/handlers.js +150 -0
- package/dist/next-fileupload/index.d.ts +135 -0
- package/dist/next-fileupload/index.d.ts.map +1 -0
- package/dist/next-fileupload/index.js +58 -0
- package/dist/next-fileupload/isEligibleRequest.d.ts +2 -0
- package/dist/next-fileupload/isEligibleRequest.d.ts.map +1 -0
- package/dist/next-fileupload/isEligibleRequest.js +36 -0
- package/dist/next-fileupload/processMultipart.d.ts +8 -0
- package/dist/next-fileupload/processMultipart.d.ts.map +1 -0
- package/dist/next-fileupload/processMultipart.js +146 -0
- package/dist/next-fileupload/processNested.d.ts +2 -0
- package/dist/next-fileupload/processNested.d.ts.map +1 -0
- package/dist/next-fileupload/processNested.js +34 -0
- package/dist/next-fileupload/uploadTimer.d.ts +7 -0
- package/dist/next-fileupload/uploadTimer.d.ts.map +1 -0
- package/dist/next-fileupload/uploadTimer.js +29 -0
- package/dist/next-fileupload/utilities.d.ts +65 -0
- package/dist/next-fileupload/utilities.d.ts.map +1 -0
- package/dist/next-fileupload/utilities.js +252 -0
- package/dist/next-stream-file/index.d.ts +2 -0
- package/dist/next-stream-file/index.d.ts.map +1 -0
- package/dist/next-stream-file/index.js +40 -0
- package/dist/pages/API/RenderJSON/index.d.ts +12 -0
- package/dist/pages/API/RenderJSON/index.d.ts.map +1 -0
- package/dist/pages/API/RenderJSON/index.js +142 -0
- package/dist/pages/API/RenderJSON/index.scss +90 -0
- package/dist/pages/API/index.client.d.ts +5 -0
- package/dist/pages/API/index.client.d.ts.map +1 -0
- package/dist/pages/API/index.client.js +241 -0
- package/dist/pages/API/index.d.ts +4 -0
- package/dist/pages/API/index.d.ts.map +1 -0
- package/dist/pages/API/index.js +27 -0
- package/dist/pages/API/index.scss +124 -0
- package/dist/pages/API/meta.d.ts +3 -0
- package/dist/pages/API/meta.d.ts.map +1 -0
- package/dist/pages/API/meta.js +21 -0
- package/dist/pages/Account/Settings/index.d.ts +6 -0
- package/dist/pages/Account/Settings/index.d.ts.map +1 -0
- package/dist/pages/Account/Settings/index.js +45 -0
- package/dist/pages/Account/Settings/index.scss +46 -0
- package/dist/pages/Account/ToggleTheme/index.d.ts +3 -0
- package/dist/pages/Account/ToggleTheme/index.d.ts.map +1 -0
- package/dist/pages/Account/ToggleTheme/index.js +87 -0
- package/dist/pages/Account/index.d.ts +13 -0
- package/dist/pages/Account/index.d.ts.map +1 -0
- package/dist/pages/Account/index.js +171 -0
- package/dist/pages/CreateFirstUser/index.client.d.ts +5 -0
- package/dist/pages/CreateFirstUser/index.client.d.ts.map +1 -0
- package/dist/pages/CreateFirstUser/index.client.js +29 -0
- package/dist/pages/CreateFirstUser/index.d.ts +11 -0
- package/dist/pages/CreateFirstUser/index.d.ts.map +1 -0
- package/dist/pages/CreateFirstUser/index.js +91 -0
- package/dist/pages/CreateFirstUser/index.scss +15 -0
- package/dist/pages/Dashboard/Default/index.client.d.ts +8 -0
- package/dist/pages/Dashboard/Default/index.client.d.ts.map +1 -0
- package/dist/pages/Dashboard/Default/index.client.js +154 -0
- package/dist/pages/Dashboard/Default/index.d.ts +11 -0
- package/dist/pages/Dashboard/Default/index.d.ts.map +1 -0
- package/dist/pages/Dashboard/Default/index.js +44 -0
- package/dist/pages/Dashboard/Default/index.scss +58 -0
- package/dist/pages/Dashboard/index.d.ts +13 -0
- package/dist/pages/Dashboard/index.d.ts.map +1 -0
- package/dist/pages/Dashboard/index.js +128 -0
- package/dist/pages/Document/getCustomViewByKey.d.ts +4 -0
- package/dist/pages/Document/getCustomViewByKey.d.ts.map +1 -0
- package/dist/pages/Document/getCustomViewByKey.js +15 -0
- package/dist/pages/Document/getCustomViewByPath.d.ts +4 -0
- package/dist/pages/Document/getCustomViewByPath.d.ts.map +1 -0
- package/dist/pages/Document/getCustomViewByPath.js +26 -0
- package/dist/pages/Document/getMetaBySegment.d.ts +20 -0
- package/dist/pages/Document/getMetaBySegment.d.ts.map +1 -0
- package/dist/pages/Document/getMetaBySegment.js +124 -0
- package/dist/pages/Document/getViewsFromConfig.d.ts +15 -0
- package/dist/pages/Document/getViewsFromConfig.d.ts.map +1 -0
- package/dist/pages/Document/getViewsFromConfig.js +224 -0
- package/dist/pages/Document/index.d.ts +23 -0
- package/dist/pages/Document/index.d.ts.map +1 -0
- package/dist/pages/Document/index.js +237 -0
- package/dist/pages/Edit/Default/Auth/APIKey.d.ts +6 -0
- package/dist/pages/Edit/Default/Auth/APIKey.d.ts.map +1 -0
- package/dist/pages/Edit/Default/Auth/APIKey.js +140 -0
- package/dist/pages/Edit/Default/Auth/index.d.ts +6 -0
- package/dist/pages/Edit/Default/Auth/index.d.ts.map +1 -0
- package/dist/pages/Edit/Default/Auth/index.js +180 -0
- package/dist/pages/Edit/Default/Auth/index.scss +61 -0
- package/dist/pages/Edit/Default/Auth/types.d.ts +14 -0
- package/dist/pages/Edit/Default/Auth/types.d.ts.map +1 -0
- package/dist/pages/Edit/Default/Auth/types.js +6 -0
- package/dist/pages/Edit/Default/RenderCustomView.d.ts +2 -0
- package/dist/pages/Edit/Default/RenderCustomView.d.ts.map +1 -0
- package/dist/pages/Edit/Default/RenderCustomView.js +3 -0
- package/dist/pages/Edit/Default/SetDocumentTitle/index.d.ts +8 -0
- package/dist/pages/Edit/Default/SetDocumentTitle/index.d.ts.map +1 -0
- package/dist/pages/Edit/Default/SetDocumentTitle/index.js +50 -0
- package/dist/pages/Edit/Default/SetStepNav/index.d.ts +13 -0
- package/dist/pages/Edit/Default/SetStepNav/index.d.ts.map +1 -0
- package/dist/pages/Edit/Default/SetStepNav/index.js +70 -0
- package/dist/pages/Edit/Default/index.d.ts +4 -0
- package/dist/pages/Edit/Default/index.d.ts.map +1 -0
- package/dist/pages/Edit/Default/index.js +202 -0
- package/dist/pages/Edit/Default/index.scss +21 -0
- package/dist/pages/Edit/Default/types.d.ts +6 -0
- package/dist/pages/Edit/Default/types.d.ts.map +1 -0
- package/dist/pages/Edit/Default/types.js +6 -0
- package/dist/pages/Edit/index.client.d.ts +4 -0
- package/dist/pages/Edit/index.client.d.ts.map +1 -0
- package/dist/pages/Edit/index.client.js +99 -0
- package/dist/pages/Edit/index.d.ts +4 -0
- package/dist/pages/Edit/index.d.ts.map +1 -0
- package/dist/pages/Edit/index.js +27 -0
- package/dist/pages/Edit/meta.d.ts +3 -0
- package/dist/pages/Edit/meta.d.ts.map +1 -0
- package/dist/pages/Edit/meta.js +36 -0
- package/dist/pages/Edit/sanitizeEditViewProps.d.ts +4 -0
- package/dist/pages/Edit/sanitizeEditViewProps.d.ts.map +1 -0
- package/dist/pages/Edit/sanitizeEditViewProps.js +24 -0
- package/dist/pages/Edit/types.d.js +7 -0
- package/dist/pages/Edit/types.d.ts +37 -0
- package/dist/pages/Edit/types.d.ts.map +1 -0
- package/dist/pages/Edit/types.js +6 -0
- package/dist/pages/ForgotPassword/index.d.ts +10 -0
- package/dist/pages/ForgotPassword/index.d.ts.map +1 -0
- package/dist/pages/ForgotPassword/index.js +101 -0
- package/dist/pages/List/Default/Cell/cellTypes.spec.js +234 -0
- package/dist/pages/List/Default/Cell/fields/Array/index.d.ts +7 -0
- package/dist/pages/List/Default/Cell/fields/Array/index.d.ts.map +1 -0
- package/dist/pages/List/Default/Cell/fields/Array/index.js +27 -0
- package/dist/pages/List/Default/Cell/fields/Blocks/index.d.ts +8 -0
- package/dist/pages/List/Default/Cell/fields/Blocks/index.d.ts.map +1 -0
- package/dist/pages/List/Default/Cell/fields/Blocks/index.js +45 -0
- package/dist/pages/List/Default/Cell/fields/Checkbox/index.d.ts +5 -0
- package/dist/pages/List/Default/Cell/fields/Checkbox/index.d.ts.map +1 -0
- package/dist/pages/List/Default/Cell/fields/Checkbox/index.js +23 -0
- package/dist/pages/List/Default/Cell/fields/Checkbox/index.scss +22 -0
- package/dist/pages/List/Default/Cell/fields/Code/index.d.ts +8 -0
- package/dist/pages/List/Default/Cell/fields/Code/index.d.ts.map +1 -0
- package/dist/pages/List/Default/Cell/fields/Code/index.js +29 -0
- package/dist/pages/List/Default/Cell/fields/Code/index.scss +27 -0
- package/dist/pages/List/Default/Cell/fields/Date/index.d.ts +7 -0
- package/dist/pages/List/Default/Cell/fields/Date/index.d.ts.map +1 -0
- package/dist/pages/List/Default/Cell/fields/Date/index.js +26 -0
- package/dist/pages/List/Default/Cell/fields/File/index.d.ts +7 -0
- package/dist/pages/List/Default/Cell/fields/File/index.d.ts.map +1 -0
- package/dist/pages/List/Default/Cell/fields/File/index.js +39 -0
- package/dist/pages/List/Default/Cell/fields/File/index.scss +23 -0
- package/dist/pages/List/Default/Cell/fields/JSON/index.d.ts +5 -0
- package/dist/pages/List/Default/Cell/fields/JSON/index.d.ts.map +1 -0
- package/dist/pages/List/Default/Cell/fields/JSON/index.js +26 -0
- package/dist/pages/List/Default/Cell/fields/JSON/index.scss +22 -0
- package/dist/pages/List/Default/Cell/fields/Relationship/index.d.ts +9 -0
- package/dist/pages/List/Default/Cell/fields/Relationship/index.d.ts.map +1 -0
- package/dist/pages/List/Default/Cell/fields/Relationship/index.js +121 -0
- package/dist/pages/List/Default/Cell/fields/Relationship/index.scss +3 -0
- package/dist/pages/List/Default/Cell/fields/Richtext/index.d.ts +2 -0
- package/dist/pages/List/Default/Cell/fields/Richtext/index.d.ts.map +1 -0
- package/dist/pages/List/Default/Cell/fields/Richtext/index.js +3 -0
- package/dist/pages/List/Default/Cell/fields/Select/index.d.ts +7 -0
- package/dist/pages/List/Default/Cell/fields/Select/index.d.ts.map +1 -0
- package/dist/pages/List/Default/Cell/fields/Select/index.js +40 -0
- package/dist/pages/List/Default/Cell/fields/Textarea/index.d.ts +4 -0
- package/dist/pages/List/Default/Cell/fields/Textarea/index.d.ts.map +1 -0
- package/dist/pages/List/Default/Cell/fields/Textarea/index.js +23 -0
- package/dist/pages/List/Default/Cell/fields/index.d.ts +17 -0
- package/dist/pages/List/Default/Cell/fields/index.d.ts.map +1 -0
- package/dist/pages/List/Default/Cell/fields/index.js +36 -0
- package/dist/pages/List/Default/Cell/index.d.ts +4 -0
- package/dist/pages/List/Default/Cell/index.d.ts.map +1 -0
- package/dist/pages/List/Default/Cell/index.js +87 -0
- package/dist/pages/List/Default/RelationshipProvider/index.d.ts +20 -0
- package/dist/pages/List/Default/RelationshipProvider/index.d.ts.map +1 -0
- package/dist/pages/List/Default/RelationshipProvider/index.js +153 -0
- package/dist/pages/List/Default/RelationshipProvider/reducer.d.ts +19 -0
- package/dist/pages/List/Default/RelationshipProvider/reducer.d.ts.map +1 -0
- package/dist/pages/List/Default/RelationshipProvider/reducer.js +55 -0
- package/dist/pages/List/Default/index.d.ts +4 -0
- package/dist/pages/List/Default/index.d.ts.map +1 -0
- package/dist/pages/List/Default/index.js +182 -0
- package/dist/pages/List/Default/index.scss +195 -0
- package/dist/pages/List/Default/types.d.ts +14 -0
- package/dist/pages/List/Default/types.d.ts.map +1 -0
- package/dist/pages/List/Default/types.js +6 -0
- package/dist/pages/List/index.d.ts +18 -0
- package/dist/pages/List/index.d.ts.map +1 -0
- package/dist/pages/List/index.js +158 -0
- package/dist/pages/LivePreview/Context/collisionDetection.d.ts +3 -0
- package/dist/pages/LivePreview/Context/collisionDetection.d.ts.map +1 -0
- package/dist/pages/LivePreview/Context/collisionDetection.js +34 -0
- package/dist/pages/LivePreview/Context/context.d.ts +50 -0
- package/dist/pages/LivePreview/Context/context.d.ts.map +1 -0
- package/dist/pages/LivePreview/Context/context.js +58 -0
- package/dist/pages/LivePreview/Context/index.d.ts +18 -0
- package/dist/pages/LivePreview/Context/index.d.ts.map +1 -0
- package/dist/pages/LivePreview/Context/index.js +208 -0
- package/dist/pages/LivePreview/Context/sizeReducer.d.ts +20 -0
- package/dist/pages/LivePreview/Context/sizeReducer.d.ts.map +1 -0
- package/dist/pages/LivePreview/Context/sizeReducer.js +41 -0
- package/dist/pages/LivePreview/Device/index.d.ts +5 -0
- package/dist/pages/LivePreview/Device/index.d.ts.map +1 -0
- package/dist/pages/LivePreview/Device/index.js +102 -0
- package/dist/pages/LivePreview/DeviceContainer/index.d.ts +5 -0
- package/dist/pages/LivePreview/DeviceContainer/index.d.ts.map +1 -0
- package/dist/pages/LivePreview/DeviceContainer/index.js +44 -0
- package/dist/pages/LivePreview/IFrame/index.d.ts +8 -0
- package/dist/pages/LivePreview/IFrame/index.d.ts.map +1 -0
- package/dist/pages/LivePreview/IFrame/index.js +74 -0
- package/dist/pages/LivePreview/IFrame/index.scss +7 -0
- package/dist/pages/LivePreview/Preview/index.d.ts +5 -0
- package/dist/pages/LivePreview/Preview/index.d.ts.map +1 -0
- package/dist/pages/LivePreview/Preview/index.js +127 -0
- package/dist/pages/LivePreview/Preview/index.scss +41 -0
- package/dist/pages/LivePreview/Toolbar/Controls/index.d.ts +5 -0
- package/dist/pages/LivePreview/Toolbar/Controls/index.d.ts.map +1 -0
- package/dist/pages/LivePreview/Toolbar/Controls/index.js +96 -0
- package/dist/pages/LivePreview/Toolbar/Controls/index.scss +59 -0
- package/dist/pages/LivePreview/Toolbar/SizeInput/index.d.ts +6 -0
- package/dist/pages/LivePreview/Toolbar/SizeInput/index.d.ts.map +1 -0
- package/dist/pages/LivePreview/Toolbar/SizeInput/index.js +112 -0
- package/dist/pages/LivePreview/Toolbar/SizeInput/index.scss +10 -0
- package/dist/pages/LivePreview/Toolbar/index.d.ts +7 -0
- package/dist/pages/LivePreview/Toolbar/index.d.ts.map +1 -0
- package/dist/pages/LivePreview/Toolbar/index.js +65 -0
- package/dist/pages/LivePreview/Toolbar/index.scss +41 -0
- package/dist/pages/LivePreview/ToolbarArea/index.d.ts +6 -0
- package/dist/pages/LivePreview/ToolbarArea/index.d.ts.map +1 -0
- package/dist/pages/LivePreview/ToolbarArea/index.js +32 -0
- package/dist/pages/LivePreview/ToolbarArea/index.scss +4 -0
- package/dist/pages/LivePreview/index.client.d.ts +11 -0
- package/dist/pages/LivePreview/index.client.d.ts.map +1 -0
- package/dist/pages/LivePreview/index.client.js +195 -0
- package/dist/pages/LivePreview/index.d.ts +5 -0
- package/dist/pages/LivePreview/index.d.ts.map +1 -0
- package/dist/pages/LivePreview/index.js +59 -0
- package/dist/pages/LivePreview/index.scss +66 -0
- package/dist/pages/LivePreview/meta.d.ts +3 -0
- package/dist/pages/LivePreview/meta.d.ts.map +1 -0
- package/dist/pages/LivePreview/meta.js +36 -0
- package/dist/pages/LivePreview/usePopupWindow.d.ts +19 -0
- package/dist/pages/LivePreview/usePopupWindow.d.ts.map +1 -0
- package/dist/pages/LivePreview/usePopupWindow.js +112 -0
- package/dist/pages/Login/LoginForm/index.d.ts +8 -0
- package/dist/pages/Login/LoginForm/index.d.ts.map +1 -0
- package/dist/pages/Login/LoginForm/index.js +67 -0
- package/dist/pages/Login/LoginForm/index.scss +8 -0
- package/dist/pages/Login/index.d.ts +14 -0
- package/dist/pages/Login/index.d.ts.map +1 -0
- package/dist/pages/Login/index.js +108 -0
- package/dist/pages/Login/index.scss +38 -0
- package/dist/pages/Logout/LogoutClient.d.ts +7 -0
- package/dist/pages/Logout/LogoutClient.d.ts.map +1 -0
- package/dist/pages/Logout/LogoutClient.js +88 -0
- package/dist/pages/Logout/index.d.ts +16 -0
- package/dist/pages/Logout/index.d.ts.map +1 -0
- package/dist/pages/Logout/index.js +61 -0
- package/dist/pages/Logout/index.scss +20 -0
- package/dist/pages/NotFound/index.d.ts +7 -0
- package/dist/pages/NotFound/index.d.ts.map +1 -0
- package/dist/pages/NotFound/index.js +48 -0
- package/dist/pages/NotFound/index.scss +36 -0
- package/dist/pages/ResetPassword/index.d.ts +12 -0
- package/dist/pages/ResetPassword/index.d.ts.map +1 -0
- package/dist/pages/ResetPassword/index.js +99 -0
- package/dist/pages/ResetPassword/index.scss +15 -0
- package/dist/pages/Root/index.d.ts +5 -0
- package/dist/pages/Root/index.d.ts.map +1 -0
- package/dist/pages/Root/index.js +17 -0
- package/dist/pages/Unauthorized/UnauthorizedClient.d.ts +5 -0
- package/dist/pages/Unauthorized/UnauthorizedClient.d.ts.map +1 -0
- package/dist/pages/Unauthorized/UnauthorizedClient.js +27 -0
- package/dist/pages/Unauthorized/index.d.ts +10 -0
- package/dist/pages/Unauthorized/index.d.ts.map +1 -0
- package/dist/pages/Unauthorized/index.js +51 -0
- package/dist/pages/Verify/index.d.ts +13 -0
- package/dist/pages/Verify/index.d.ts.map +1 -0
- package/dist/pages/Verify/index.js +90 -0
- package/dist/pages/Verify/index.scss +14 -0
- package/dist/pages/Version/Default/SetStepNav.d.ts +13 -0
- package/dist/pages/Version/Default/SetStepNav.d.ts.map +1 -0
- package/dist/pages/Version/Default/SetStepNav.js +92 -0
- package/dist/pages/Version/Default/index.d.ts +5 -0
- package/dist/pages/Version/Default/index.d.ts.map +1 -0
- package/dist/pages/Version/Default/index.js +157 -0
- package/dist/pages/Version/Default/index.scss +70 -0
- package/dist/pages/Version/Default/types.d.ts +24 -0
- package/dist/pages/Version/Default/types.d.ts.map +1 -0
- package/dist/pages/Version/Default/types.js +6 -0
- package/dist/pages/Version/RenderFieldsToDiff/Label/index.d.ts +7 -0
- package/dist/pages/Version/RenderFieldsToDiff/Label/index.d.ts.map +1 -0
- package/dist/pages/Version/RenderFieldsToDiff/Label/index.js +24 -0
- package/dist/pages/Version/RenderFieldsToDiff/Label/index.scss +4 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/Iterable/index.d.ts +6 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/Iterable/index.d.ts.map +1 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/Iterable/index.js +80 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/Iterable/index.scss +34 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/Nested/index.d.ts +6 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/Nested/index.d.ts.map +1 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/Nested/index.js +44 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/Nested/index.scss +12 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/Relationship/index.d.ts +6 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/Relationship/index.d.ts.map +1 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/Relationship/index.js +89 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/Relationship/index.scss +13 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/Select/DiffViewer/index.d.ts +9 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/Select/DiffViewer/index.d.ts.map +1 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/Select/DiffViewer/index.js +72 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/Select/index.d.ts +6 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/Select/index.d.ts.map +1 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/Select/index.js +54 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/Select/index.scss +13 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/Tabs/index.d.ts +5 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/Tabs/index.d.ts.map +1 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/Tabs/index.js +54 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/Text/DiffViewer/index.d.ts +9 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/Text/DiffViewer/index.d.ts.map +1 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/Text/DiffViewer/index.js +72 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/Text/index.d.ts +6 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/Text/index.d.ts.map +1 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/Text/index.js +46 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/Text/index.scss +13 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/diffMethods.d.ts +7 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/diffMethods.d.ts.map +1 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/diffMethods.js +18 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/index.d.ts +25 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/index.d.ts.map +1 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/index.js +44 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/styles.d.ts +27 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/styles.d.ts.map +1 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/styles.js +38 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/types.d.ts +21 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/types.d.ts.map +1 -0
- package/dist/pages/Version/RenderFieldsToDiff/fields/types.js +6 -0
- package/dist/pages/Version/RenderFieldsToDiff/index.d.ts +6 -0
- package/dist/pages/Version/RenderFieldsToDiff/index.d.ts.map +1 -0
- package/dist/pages/Version/RenderFieldsToDiff/index.js +115 -0
- package/dist/pages/Version/RenderFieldsToDiff/index.scss +18 -0
- package/dist/pages/Version/RenderFieldsToDiff/types.d.ts +20 -0
- package/dist/pages/Version/RenderFieldsToDiff/types.d.ts.map +1 -0
- package/dist/pages/Version/RenderFieldsToDiff/types.js +6 -0
- package/dist/pages/Version/Restore/index.d.ts +6 -0
- package/dist/pages/Version/Restore/index.d.ts.map +1 -0
- package/dist/pages/Version/Restore/index.js +121 -0
- package/dist/pages/Version/Restore/index.scss +28 -0
- package/dist/pages/Version/Restore/types.d.ts +11 -0
- package/dist/pages/Version/Restore/types.d.ts.map +1 -0
- package/dist/pages/Version/Restore/types.js +6 -0
- package/dist/pages/Version/SelectComparison/index.d.ts +5 -0
- package/dist/pages/Version/SelectComparison/index.d.ts.map +1 -0
- package/dist/pages/Version/SelectComparison/index.js +167 -0
- package/dist/pages/Version/SelectComparison/index.scss +13 -0
- package/dist/pages/Version/SelectComparison/types.d.ts +27 -0
- package/dist/pages/Version/SelectComparison/types.d.ts.map +1 -0
- package/dist/pages/Version/SelectComparison/types.js +6 -0
- package/dist/pages/Version/SelectLocales/index.d.ts +5 -0
- package/dist/pages/Version/SelectLocales/index.d.ts.map +1 -0
- package/dist/pages/Version/SelectLocales/index.js +47 -0
- package/dist/pages/Version/SelectLocales/index.scss +7 -0
- package/dist/pages/Version/SelectLocales/types.d.ts +7 -0
- package/dist/pages/Version/SelectLocales/types.d.ts.map +1 -0
- package/dist/pages/Version/SelectLocales/types.js +6 -0
- package/dist/pages/Version/index.d.ts +4 -0
- package/dist/pages/Version/index.d.ts.map +1 -0
- package/dist/pages/Version/index.js +111 -0
- package/dist/pages/Version/meta.d.ts +3 -0
- package/dist/pages/Version/meta.d.ts.map +1 -0
- package/dist/pages/Version/meta.js +47 -0
- package/dist/pages/Version/shared.d.ts +9 -0
- package/dist/pages/Version/shared.d.ts.map +1 -0
- package/dist/pages/Version/shared.js +28 -0
- package/dist/pages/Versions/buildColumns.d.ts +11 -0
- package/dist/pages/Versions/buildColumns.d.ts.map +1 -0
- package/dist/pages/Versions/buildColumns.js +69 -0
- package/dist/pages/Versions/cells/AutosaveCell/index.d.ts +3 -0
- package/dist/pages/Versions/cells/AutosaveCell/index.d.ts.map +1 -0
- package/dist/pages/Versions/cells/AutosaveCell/index.js +63 -0
- package/dist/pages/Versions/cells/CreatedAt/index.d.ts +9 -0
- package/dist/pages/Versions/cells/CreatedAt/index.d.ts.map +1 -0
- package/dist/pages/Versions/cells/CreatedAt/index.js +33 -0
- package/dist/pages/Versions/cells/ID/index.d.ts +3 -0
- package/dist/pages/Versions/cells/ID/index.d.ts.map +1 -0
- package/dist/pages/Versions/cells/ID/index.js +60 -0
- package/dist/pages/Versions/index.client.d.ts +15 -0
- package/dist/pages/Versions/index.client.d.ts.map +1 -0
- package/dist/pages/Versions/index.client.js +142 -0
- package/dist/pages/Versions/index.d.ts +6 -0
- package/dist/pages/Versions/index.d.ts.map +1 -0
- package/dist/pages/Versions/index.js +125 -0
- package/dist/pages/Versions/index.scss +108 -0
- package/dist/pages/Versions/meta.d.ts +3 -0
- package/dist/pages/Versions/meta.d.ts.map +1 -0
- package/dist/pages/Versions/meta.js +43 -0
- package/dist/pages/Versions/types.d.ts +19 -0
- package/dist/pages/Versions/types.d.ts.map +1 -0
- package/dist/pages/Versions/types.js +6 -0
- package/dist/routes/graphql/handler.d.ts +4 -0
- package/dist/routes/graphql/handler.d.ts.map +1 -0
- package/dist/routes/graphql/handler.js +128 -0
- package/dist/routes/graphql/index.d.ts +3 -0
- package/dist/routes/graphql/index.d.ts.map +1 -0
- package/dist/routes/graphql/index.js +22 -0
- package/dist/routes/graphql/playground.d.ts +3 -0
- package/dist/routes/graphql/playground.d.ts.map +1 -0
- package/dist/routes/graphql/playground.js +37 -0
- package/dist/routes/index.d.ts +4 -0
- package/dist/routes/index.d.ts.map +1 -0
- package/dist/routes/index.js +38 -0
- package/dist/routes/rest/RouteError.d.ts +13 -0
- package/dist/routes/rest/RouteError.d.ts.map +1 -0
- package/dist/routes/rest/RouteError.js +104 -0
- package/dist/routes/rest/[collection]/file/[filename]/route.d.ts +8 -0
- package/dist/routes/rest/[collection]/file/[filename]/route.d.ts.map +1 -0
- package/dist/routes/rest/[collection]/file/[filename]/route.js +116 -0
- package/dist/routes/rest/auth/access.d.ts +3 -0
- package/dist/routes/rest/auth/access.d.ts.map +1 -0
- package/dist/routes/rest/auth/access.js +27 -0
- package/dist/routes/rest/auth/forgotPassword.d.ts +3 -0
- package/dist/routes/rest/auth/forgotPassword.d.ts.map +1 -0
- package/dist/routes/rest/auth/forgotPassword.js +36 -0
- package/dist/routes/rest/auth/init.d.ts +3 -0
- package/dist/routes/rest/auth/init.d.ts.map +1 -0
- package/dist/routes/rest/auth/init.js +22 -0
- package/dist/routes/rest/auth/login.d.ts +3 -0
- package/dist/routes/rest/auth/login.d.ts.map +1 -0
- package/dist/routes/rest/auth/login.js +52 -0
- package/dist/routes/rest/auth/logout.d.ts +3 -0
- package/dist/routes/rest/auth/logout.d.ts.map +1 -0
- package/dist/routes/rest/auth/logout.js +46 -0
- package/dist/routes/rest/auth/me.d.ts +3 -0
- package/dist/routes/rest/auth/me.d.ts.map +1 -0
- package/dist/routes/rest/auth/me.js +37 -0
- package/dist/routes/rest/auth/refresh.d.ts +3 -0
- package/dist/routes/rest/auth/refresh.d.ts.map +1 -0
- package/dist/routes/rest/auth/refresh.js +54 -0
- package/dist/routes/rest/auth/registerFirstUser.d.ts +3 -0
- package/dist/routes/rest/auth/registerFirstUser.d.ts.map +1 -0
- package/dist/routes/rest/auth/registerFirstUser.js +47 -0
- package/dist/routes/rest/auth/resetPassword.d.ts +3 -0
- package/dist/routes/rest/auth/resetPassword.d.ts.map +1 -0
- package/dist/routes/rest/auth/resetPassword.js +51 -0
- package/dist/routes/rest/auth/unlock.d.ts +3 -0
- package/dist/routes/rest/auth/unlock.d.ts.map +1 -0
- package/dist/routes/rest/auth/unlock.js +34 -0
- package/dist/routes/rest/auth/verifyEmail.d.ts +3 -0
- package/dist/routes/rest/auth/verifyEmail.d.ts.map +1 -0
- package/dist/routes/rest/auth/verifyEmail.js +32 -0
- package/dist/routes/rest/buildFormState.d.ts +7 -0
- package/dist/routes/rest/buildFormState.d.ts.map +1 -0
- package/dist/routes/rest/buildFormState.js +96 -0
- package/dist/routes/rest/checkEndpoints.d.ts +5 -0
- package/dist/routes/rest/checkEndpoints.d.ts.map +1 -0
- package/dist/routes/rest/checkEndpoints.js +27 -0
- package/dist/routes/rest/collections/create.d.ts +3 -0
- package/dist/routes/rest/collections/create.d.ts.map +1 -0
- package/dist/routes/rest/collections/create.js +42 -0
- package/dist/routes/rest/collections/delete.d.ts +3 -0
- package/dist/routes/rest/collections/delete.d.ts.map +1 -0
- package/dist/routes/rest/collections/delete.js +57 -0
- package/dist/routes/rest/collections/deleteByID.d.ts +3 -0
- package/dist/routes/rest/collections/deleteByID.d.ts.map +1 -0
- package/dist/routes/rest/collections/deleteByID.js +43 -0
- package/dist/routes/rest/collections/docAccess.d.ts +3 -0
- package/dist/routes/rest/collections/docAccess.d.ts.map +1 -0
- package/dist/routes/rest/collections/docAccess.js +29 -0
- package/dist/routes/rest/collections/find.d.ts +3 -0
- package/dist/routes/rest/collections/find.d.ts.map +1 -0
- package/dist/routes/rest/collections/find.js +39 -0
- package/dist/routes/rest/collections/findByID.d.ts +3 -0
- package/dist/routes/rest/collections/findByID.d.ts.map +1 -0
- package/dist/routes/rest/collections/findByID.js +34 -0
- package/dist/routes/rest/collections/findVersionByID.d.ts +3 -0
- package/dist/routes/rest/collections/findVersionByID.d.ts.map +1 -0
- package/dist/routes/rest/collections/findVersionByID.js +33 -0
- package/dist/routes/rest/collections/findVersions.d.ts +3 -0
- package/dist/routes/rest/collections/findVersions.d.ts.map +1 -0
- package/dist/routes/rest/collections/findVersions.js +38 -0
- package/dist/routes/rest/collections/restoreVersion.d.ts +3 -0
- package/dist/routes/rest/collections/restoreVersion.d.ts.map +1 -0
- package/dist/routes/rest/collections/restoreVersion.js +36 -0
- package/dist/routes/rest/collections/update.d.ts +3 -0
- package/dist/routes/rest/collections/update.d.ts.map +1 -0
- package/dist/routes/rest/collections/update.js +59 -0
- package/dist/routes/rest/collections/updateByID.d.ts +3 -0
- package/dist/routes/rest/collections/updateByID.d.ts.map +1 -0
- package/dist/routes/rest/collections/updateByID.js +44 -0
- package/dist/routes/rest/globals/docAccess.d.ts +3 -0
- package/dist/routes/rest/globals/docAccess.d.ts.map +1 -0
- package/dist/routes/rest/globals/docAccess.js +28 -0
- package/dist/routes/rest/globals/findOne.d.ts +3 -0
- package/dist/routes/rest/globals/findOne.d.ts.map +1 -0
- package/dist/routes/rest/globals/findOne.js +34 -0
- package/dist/routes/rest/globals/findVersionByID.d.ts +3 -0
- package/dist/routes/rest/globals/findVersionByID.d.ts.map +1 -0
- package/dist/routes/rest/globals/findVersionByID.js +33 -0
- package/dist/routes/rest/globals/findVersions.d.ts +3 -0
- package/dist/routes/rest/globals/findVersions.d.ts.map +1 -0
- package/dist/routes/rest/globals/findVersions.js +38 -0
- package/dist/routes/rest/globals/restoreVersion.d.ts +3 -0
- package/dist/routes/rest/globals/restoreVersion.d.ts.map +1 -0
- package/dist/routes/rest/globals/restoreVersion.js +36 -0
- package/dist/routes/rest/globals/update.d.ts +3 -0
- package/dist/routes/rest/globals/update.d.ts.map +1 -0
- package/dist/routes/rest/globals/update.js +44 -0
- package/dist/routes/rest/index.d.ts +22 -0
- package/dist/routes/rest/index.d.ts.map +1 -0
- package/dist/routes/rest/index.js +546 -0
- package/dist/routes/rest/types.d.ts +23 -0
- package/dist/routes/rest/types.d.ts.map +1 -0
- package/dist/routes/rest/types.js +6 -0
- package/dist/scss/app.scss +209 -0
- package/dist/scss/colors.scss +269 -0
- package/dist/scss/custom.css +1 -0
- package/dist/scss/fonts.scss +75 -0
- package/dist/scss/queries.scss +27 -0
- package/dist/scss/resets.scss +17 -0
- package/dist/scss/styles.scss +11 -0
- package/dist/scss/svg.scss +10 -0
- package/dist/scss/toastify.scss +59 -0
- package/dist/scss/type.scss +117 -0
- package/dist/scss/vars.scss +220 -0
- package/dist/scss/z-index.scss +9 -0
- package/dist/utilities/auth.d.ts +10 -0
- package/dist/utilities/auth.d.ts.map +1 -0
- package/dist/utilities/auth.js +42 -0
- package/dist/utilities/createClientConfig.d.ts +5 -0
- package/dist/utilities/createClientConfig.d.ts.map +1 -0
- package/dist/utilities/createClientConfig.js +120 -0
- package/dist/utilities/createPayloadRequest.d.ts +11 -0
- package/dist/utilities/createPayloadRequest.d.ts.map +1 -0
- package/dist/utilities/createPayloadRequest.js +95 -0
- package/dist/utilities/getDataAndFile.d.ts +12 -0
- package/dist/utilities/getDataAndFile.d.ts.map +1 -0
- package/dist/utilities/getDataAndFile.js +74 -0
- package/dist/utilities/getNextI18n.d.ts +7 -0
- package/dist/utilities/getNextI18n.d.ts.map +1 -0
- package/dist/utilities/getNextI18n.js +28 -0
- package/dist/utilities/getNextT.d.ts +7 -0
- package/dist/utilities/getNextT.d.ts.map +1 -0
- package/dist/utilities/getNextT.js +28 -0
- package/dist/utilities/getRequestLanguage.d.ts +9 -0
- package/dist/utilities/getRequestLanguage.d.ts.map +1 -0
- package/dist/utilities/getRequestLanguage.js +19 -0
- package/dist/utilities/getRequestLocales.d.ts +12 -0
- package/dist/utilities/getRequestLocales.d.ts.map +1 -0
- package/dist/utilities/getRequestLocales.js +38 -0
- package/dist/utilities/initPage.d.ts +21 -0
- package/dist/utilities/initPage.d.ts.map +1 -0
- package/dist/utilities/initPage.js +79 -0
- package/dist/utilities/meta.d.ts +9 -0
- package/dist/utilities/meta.d.ts.map +1 -0
- package/dist/utilities/meta.js +45 -0
- package/dist/withPayload.d.ts +3 -0
- package/dist/withPayload.d.ts.map +1 -0
- package/dist/withPayload.js +77 -0
- package/package.json +83 -0
- package/src/index.ts +1 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "DefaultDashboardClient", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function() {
|
|
9
|
+
return DefaultDashboardClient;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
const _translations = require("@payloadcms/translations");
|
|
13
|
+
const _ui = require("@payloadcms/ui");
|
|
14
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
15
|
+
require("./index.scss");
|
|
16
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
17
|
+
if (typeof WeakMap !== "function") return null;
|
|
18
|
+
var cacheBabelInterop = new WeakMap();
|
|
19
|
+
var cacheNodeInterop = new WeakMap();
|
|
20
|
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
21
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
22
|
+
})(nodeInterop);
|
|
23
|
+
}
|
|
24
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
25
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
26
|
+
return obj;
|
|
27
|
+
}
|
|
28
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
29
|
+
return {
|
|
30
|
+
default: obj
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
34
|
+
if (cache && cache.has(obj)) {
|
|
35
|
+
return cache.get(obj);
|
|
36
|
+
}
|
|
37
|
+
var newObj = {
|
|
38
|
+
__proto__: null
|
|
39
|
+
};
|
|
40
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
41
|
+
for(var key in obj){
|
|
42
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
43
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
44
|
+
if (desc && (desc.get || desc.set)) {
|
|
45
|
+
Object.defineProperty(newObj, key, desc);
|
|
46
|
+
} else {
|
|
47
|
+
newObj[key] = obj[key];
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
newObj.default = obj;
|
|
52
|
+
if (cache) {
|
|
53
|
+
cache.set(obj, newObj);
|
|
54
|
+
}
|
|
55
|
+
return newObj;
|
|
56
|
+
}
|
|
57
|
+
const baseClass = 'dashboard';
|
|
58
|
+
const DefaultDashboardClient = ({ Link, visibleCollections, visibleGlobals })=>{
|
|
59
|
+
const config = (0, _ui.useConfig)();
|
|
60
|
+
const { collections: collectionsConfig, globals: globalsConfig, routes: { admin } } = config;
|
|
61
|
+
const { setViewActions } = (0, _ui.useActions)();
|
|
62
|
+
(0, _react.useEffect)(()=>{
|
|
63
|
+
setViewActions([]);
|
|
64
|
+
}, [
|
|
65
|
+
setViewActions
|
|
66
|
+
]);
|
|
67
|
+
const { permissions, user } = (0, _ui.useAuth)();
|
|
68
|
+
const { i18n, t } = (0, _ui.useTranslation)();
|
|
69
|
+
const [groups, setGroups] = (0, _react.useState)([]);
|
|
70
|
+
(0, _react.useEffect)(()=>{
|
|
71
|
+
const collections = collectionsConfig.filter((collection)=>permissions?.collections?.[collection.slug]?.read?.permission && visibleCollections.includes(collection.slug));
|
|
72
|
+
const globals = globalsConfig.filter((global)=>permissions?.globals?.[global.slug]?.read?.permission && visibleGlobals.includes(global.slug));
|
|
73
|
+
setGroups((0, _ui.groupNavItems)([
|
|
74
|
+
...collections.map((collection)=>{
|
|
75
|
+
const entityToGroup = {
|
|
76
|
+
type: _ui.EntityType.collection,
|
|
77
|
+
entity: collection
|
|
78
|
+
};
|
|
79
|
+
return entityToGroup;
|
|
80
|
+
}) ?? [],
|
|
81
|
+
...globals.map((global)=>{
|
|
82
|
+
const entityToGroup = {
|
|
83
|
+
type: _ui.EntityType.global,
|
|
84
|
+
entity: global
|
|
85
|
+
};
|
|
86
|
+
return entityToGroup;
|
|
87
|
+
}) ?? []
|
|
88
|
+
], permissions, i18n));
|
|
89
|
+
}, [
|
|
90
|
+
permissions,
|
|
91
|
+
user,
|
|
92
|
+
i18n,
|
|
93
|
+
visibleCollections,
|
|
94
|
+
visibleGlobals,
|
|
95
|
+
collectionsConfig,
|
|
96
|
+
globalsConfig
|
|
97
|
+
]);
|
|
98
|
+
return /*#__PURE__*/ _react.default.createElement(_react.Fragment, null, groups.map(({ entities, label }, groupIndex)=>{
|
|
99
|
+
return /*#__PURE__*/ _react.default.createElement("div", {
|
|
100
|
+
className: `${baseClass}__group`,
|
|
101
|
+
key: groupIndex
|
|
102
|
+
}, /*#__PURE__*/ _react.default.createElement("h2", {
|
|
103
|
+
className: `${baseClass}__label`
|
|
104
|
+
}, label), /*#__PURE__*/ _react.default.createElement("ul", {
|
|
105
|
+
className: `${baseClass}__card-list`
|
|
106
|
+
}, entities.map(({ type, entity }, entityIndex)=>{
|
|
107
|
+
let title;
|
|
108
|
+
let buttonAriaLabel;
|
|
109
|
+
let createHREF;
|
|
110
|
+
let href;
|
|
111
|
+
let hasCreatePermission;
|
|
112
|
+
if (type === _ui.EntityType.collection) {
|
|
113
|
+
title = (0, _translations.getTranslation)(entity.labels.plural, i18n);
|
|
114
|
+
buttonAriaLabel = t('general:showAllLabel', {
|
|
115
|
+
label: title
|
|
116
|
+
});
|
|
117
|
+
href = `${admin}/collections/${entity.slug}`;
|
|
118
|
+
createHREF = `${admin}/collections/${entity.slug}/create`;
|
|
119
|
+
hasCreatePermission = permissions?.collections?.[entity.slug]?.create?.permission;
|
|
120
|
+
}
|
|
121
|
+
if (type === _ui.EntityType.global) {
|
|
122
|
+
title = (0, _translations.getTranslation)(entity.label, i18n);
|
|
123
|
+
buttonAriaLabel = t('general:editLabel', {
|
|
124
|
+
label: (0, _translations.getTranslation)(entity.label, i18n)
|
|
125
|
+
});
|
|
126
|
+
href = `${admin}/globals/${entity.slug}`;
|
|
127
|
+
}
|
|
128
|
+
return /*#__PURE__*/ _react.default.createElement("li", {
|
|
129
|
+
key: entityIndex
|
|
130
|
+
}, /*#__PURE__*/ _react.default.createElement(_ui.Card, {
|
|
131
|
+
Link: Link,
|
|
132
|
+
actions: hasCreatePermission && type === _ui.EntityType.collection ? /*#__PURE__*/ _react.default.createElement(_ui.Button, {
|
|
133
|
+
Link: Link,
|
|
134
|
+
"aria-label": t('general:createNewLabel', {
|
|
135
|
+
label: (0, _translations.getTranslation)(entity.labels.singular, i18n)
|
|
136
|
+
}),
|
|
137
|
+
buttonStyle: "icon-label",
|
|
138
|
+
el: "link",
|
|
139
|
+
icon: "plus",
|
|
140
|
+
iconStyle: "with-border",
|
|
141
|
+
round: true,
|
|
142
|
+
to: createHREF
|
|
143
|
+
}) : undefined,
|
|
144
|
+
buttonAriaLabel: buttonAriaLabel,
|
|
145
|
+
href: href,
|
|
146
|
+
id: `card-${entity.slug}`,
|
|
147
|
+
title: title,
|
|
148
|
+
titleAs: "h3"
|
|
149
|
+
}));
|
|
150
|
+
})));
|
|
151
|
+
}));
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9wYWdlcy9EYXNoYm9hcmQvRGV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gICAgICAgICAgICAgdHlwZTogRW50aXR5VHlwZS5jb2xsZWN0aW9uLFxuICAgICAgICAgICAgICBlbnRpdHk6IGNvbGxlY3Rpb24sXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBlbnRpdHlUb0dyb3VwXG4gICAgICAgICAgfSkgPz8gW10pLFxuICAgICAgICAgIC4uLihnbG9iYWxzLm1hcCgoZ2xvYmFsKSA9PiB7XG4gICAgICAgICAgICBjb25zdCBlbnRpdHlUb0dyb3VwOiBFbnRpdHlUb0dyb3VwID0ge1xuICAgICAgICAgICAgICB0eXBlOiBFbnRpdHlUeXBlLmdsb2JhbCxcbiAgICAgICAgICAgICAgZW50aXR5OiBnbG9iYWwsXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBlbnRpdHlUb0dyb3VwXG4gICAgICAgICAgfSkgPz8gW10pLFxuICAgICAgICBdLFxuICAgICAgICBwZXJtaXNzaW9ucyxcbiAgICAgICAgaTE4bixcbiAgICAgICksXG4gICAgKVxuICB9LCBbXG4gICAgcGVybWlzc2lvbnMsXG4gICAgdXNlcixcbiAgICBpMThuLFxuICAgIHZpc2libGVDb2xsZWN0aW9ucyxcbiAgICB2aXNpYmxlR2xvYmFscyxcbiAgICBjb2xsZWN0aW9uc0NvbmZpZyxcbiAgICBnbG9iYWxzQ29uZmlnLFxuICBdKVxuXG4gIHJldHVybiAoXG4gICAgPEZyYWdtZW50PlxuICAgICAge2dyb3Vwcy5tYXAoKHsgZW50aXRpZXMsIGxhYmVsIH0sIGdyb3VwSW5kZXgpID0+IHtcbiAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT17YCR7YmFzZUNsYXNzfV9fZ3JvdXBgfSBrZXk9e2dyb3VwSW5kZXh9PlxuICAgICAgICAgICAgPGgyIGNsYXNzTmFtZT17YCR7YmFzZUNsYXNzfV9fbGFiZWxgfT57bGFiZWx9PC9oMj5cbiAgICAgICAgICAgIDx1bCBjbGFzc05hbWU9e2Ake2Jhc2VDbGFzc31fX2NhcmQtbGlzdGB9PlxuICAgICAgICAgICAgICB7ZW50aXRpZXMubWFwKCh7IHR5cGUsIGVudGl0eSB9LCBlbnRpdHlJbmRleCkgPT4ge1xuICAgICAgICAgICAgICAgIGxldCB0aXRsZTogc3RyaW5nXG4gICAgICAgICAgICAgICAgbGV0IGJ1dHRvbkFyaWFMYWJlbDogc3RyaW5nXG4gICAgICAgICAgICAgICAgbGV0IGNyZWF0ZUhSRUY6IHN0cmluZ1xuICAgICAgICAgICAgICAgIGxldCBocmVmOiBzdHJpbmdcbiAgICAgICAgICAgICAgICBsZXQgaGFzQ3JlYXRlUGVybWlzc2lvbjogYm9vbGVhblxuXG4gICAgICAgICAgICAgICAgaWYgKHR5cGUgPT09IEVudGl0eVR5cGUuY29sbGVjdGlvbikge1xuICAgICAgICAgICAgICAgICAgdGl0bGUgPSBnZXRUcmFuc2xhdGlvbihlbnRpdHkubGFiZWxzLnBsdXJhbCwgaTE4bilcbiAgICAgICAgICAgICAgICAgIGJ1dHRvbkFyaWFMYWJlbCA9IHQoJ2dlbmVyYWw6c2hvd0FsbExhYmVsJywgeyBsYWJlbDogdGl0bGUgfSlcbiAgICAgICAgICAgICAgICAgIGhyZWYgPSBgJHthZG1pbn0vY29sbGVjdGlvbnMvJHtlbnRpdHkuc2x1Z31gXG4gICAgICAgICAgICAgICAgICBjcmVhdGVIUkVGID0gYCR7YWRtaW59L2NvbGxlY3Rpb25zLyR7ZW50aXR5LnNsdWd9L2NyZWF0ZWBcbiAgICAgICAgICAgICAgICAgIGhhc0NyZWF0ZVBlcm1pc3Npb24gPSBwZXJtaXNzaW9ucz8uY29sbGVjdGlvbnM/LltlbnRpdHkuc2x1Z10/LmNyZWF0ZT8ucGVybWlzc2lvblxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmICh0eXBlID09PSBFbnRpdHlUeXBlLmdsb2JhbCkge1xuICAgICAgICAgICAgICAgICAgdGl0bGUgPSBnZXRUcmFuc2xhdGlvbihlbnRpdHkubGFiZWwsIGkxOG4pXG4gICAgICAgICAgICAgICAgICBidXR0b25BcmlhTGFiZWwgPSB0KCdnZW5lcmFsOmVkaXRMYWJlbCcsIHtcbiAgICAgICAgICAgICAgICAgICAgbGFiZWw6IGdldFRyYW5zbGF0aW9uKGVudGl0eS5sYWJlbCwgaTE4biksXG4gICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgaHJlZiA9IGAke2FkbWlufS9nbG9iYWxzLyR7ZW50aXR5LnNsdWd9YFxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgICA8bGkga2V5PXtlbnRpdHlJbmRleH0+XG4gICAgICAgICAgICAgICAgICAgIDxDYXJkXG4gICAgICAgICAgICAgICAgICAgICAgTGluaz17TGlua31cbiAgICAgICAgICAgICAgICAgICAgICBhY3Rpb25zPXtcbiAgICAgICAgICAgICAgICAgICAgICAgIGhhc0NyZWF0ZVBlcm1pc3Npb24gJiYgdHlwZSA9PT0gRW50aXR5VHlwZS5jb2xsZWN0aW9uID8gKFxuICAgICAgICAgICAgICAgICAgICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTGluaz17TGlua31cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcmlhLWxhYmVsPXt0KCdnZW5lcmFsOmNyZWF0ZU5ld0xhYmVsJywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IGdldFRyYW5zbGF0aW9uKGVudGl0eS5sYWJlbHMuc2luZ3VsYXIsIGkxOG4pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ1dHRvblN0eWxlPVwiaWNvbi1sYWJlbFwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZWw9XCJsaW5rXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpY29uPVwicGx1c1wiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWNvblN0eWxlPVwid2l0aC1ib3JkZXJcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJvdW5kXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdG89e2NyZWF0ZUhSRUZ9XG4gICAgICAgICAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgICAgICAgICApIDogdW5kZWZpbmVkXG4gICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgIGJ1dHRvbkFyaWFMYWJlbD17YnV0dG9uQXJpYUxhYmVsfVxuICAgICAgICAgICAgICAgICAgICAgIGhyZWY9e2hyZWZ9XG4gICAgICAgICAgICAgICAgICAgICAgaWQ9e2BjYXJkLSR7ZW50aXR5LnNsdWd9YH1cbiAgICAgICAgICAgICAgICAgICAgICB0aXRsZT17dGl0bGV9XG4gICAgICAgICAgICAgICAgICAgICAgdGl0bGVBcz1cImgzXCJcbiAgICAgICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICAgIDwvbGk+XG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICB9KX1cbiAgICAgICAgICAgIDwvdWw+XG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgIClcbiAgICAgIH0pfVxuICAgIDwvRnJhZ21lbnQ+XG4gIClcbn1cbiJdLCJuYW1lcyI6WyJEZWZhdWx0RGFzaGJvYXJkQ2xpZW50IiwiYmFzZUNsYXNzIiwiTGluayIsInZpc2libGVDb2xsZWN0aW9ucyIsInZpc2libGVHbG9iYWxzIiwiY29uZmlnIiwidXNlQ29uZmlnIiwiY29sbGVjdGlvbnMiLCJjb2xsZWN0aW9uc0NvbmZpZyIsImdsb2JhbHMiLCJnbG9iYWxzQ29uZmlnIiwicm91dGVzIiwiYWRtaW4iLCJzZXRWaWV3QWN0aW9ucyIsInVzZUFjdGlvb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UFJbEI7cUJBRUptQjtnQkFFTnBCLGlCQUFpQkE7Z0JBQ2pCRSxNQUFNQTtnQkFDTm1CLElBQUksQ0FBQyxLQUFLLEVBQUVqQyxPQUFPVixJQUFJLENBQUMsQ0FBQztnQkFDekJxQixPQUFPQTtnQkFDUHVCLFNBQVE7O1FBSWhCO0lBSVI7QUFHTiJ9
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SanitizedConfig } from 'payload/types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import './index.scss';
|
|
4
|
+
export type DashboardProps = {
|
|
5
|
+
Link: React.ComponentType<any>;
|
|
6
|
+
config: SanitizedConfig;
|
|
7
|
+
visibleCollections: string[];
|
|
8
|
+
visibleGlobals: string[];
|
|
9
|
+
};
|
|
10
|
+
export declare const DefaultDashboard: React.FC<DashboardProps>;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/pages/Dashboard/Default/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAGpD,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,cAAc,CAAA;AAIrB,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAA;IAC9B,MAAM,EAAE,eAAe,CAAA;IACvB,kBAAkB,EAAE,MAAM,EAAE,CAAA;IAC5B,cAAc,EAAE,MAAM,EAAE,CAAA;CACzB,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAkCrD,CAAA"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "DefaultDashboard", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return DefaultDashboard;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _ui = require("@payloadcms/ui");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_default(require("react"));
|
|
13
|
+
const _indexclient = require("./index.client");
|
|
14
|
+
require("./index.scss");
|
|
15
|
+
function _interop_require_default(obj) {
|
|
16
|
+
return obj && obj.__esModule ? obj : {
|
|
17
|
+
default: obj
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
const baseClass = 'dashboard';
|
|
21
|
+
const DefaultDashboard = (props)=>{
|
|
22
|
+
const { Link, config: { admin: { components: { afterDashboard, beforeDashboard } } }, visibleCollections, visibleGlobals } = props;
|
|
23
|
+
// const { setViewActions } = useActions()
|
|
24
|
+
// useEffect(() => {
|
|
25
|
+
// setViewActions([])
|
|
26
|
+
// }, [setViewActions])
|
|
27
|
+
return /*#__PURE__*/ _react.default.createElement("div", {
|
|
28
|
+
className: baseClass
|
|
29
|
+
}, /*#__PURE__*/ _react.default.createElement(_ui.SetStepNav, {
|
|
30
|
+
nav: []
|
|
31
|
+
}), /*#__PURE__*/ _react.default.createElement(_ui.Gutter, {
|
|
32
|
+
className: `${baseClass}__wrap`
|
|
33
|
+
}, Array.isArray(beforeDashboard) && beforeDashboard.map((Component, i)=>/*#__PURE__*/ _react.default.createElement(Component, {
|
|
34
|
+
key: i
|
|
35
|
+
})), /*#__PURE__*/ _react.default.createElement(_indexclient.DefaultDashboardClient, {
|
|
36
|
+
Link: Link,
|
|
37
|
+
visibleCollections: visibleCollections,
|
|
38
|
+
visibleGlobals: visibleGlobals
|
|
39
|
+
}), Array.isArray(afterDashboard) && afterDashboard.map((Component, i)=>/*#__PURE__*/ _react.default.createElement(Component, {
|
|
40
|
+
key: i
|
|
41
|
+
}))));
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW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'../../../scss/styles.scss';
|
|
2
|
+
|
|
3
|
+
.dashboard {
|
|
4
|
+
width: 100%;
|
|
5
|
+
--gap: var(--base);
|
|
6
|
+
--cols: 5;
|
|
7
|
+
|
|
8
|
+
&__wrap {
|
|
9
|
+
padding-bottom: var(--spacing-view-bottom);
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
gap: var(--base);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&__group {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
gap: var(--gap);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&__label {
|
|
22
|
+
margin: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&__card-list {
|
|
26
|
+
padding: 0;
|
|
27
|
+
margin: 0;
|
|
28
|
+
list-style: none;
|
|
29
|
+
display: flex;
|
|
30
|
+
gap: var(--gap);
|
|
31
|
+
flex-wrap: wrap;
|
|
32
|
+
|
|
33
|
+
li {
|
|
34
|
+
width: calc(100% / var(--cols) - var(--gap) / var(--cols) * (var(--cols) - 1));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.card {
|
|
38
|
+
height: 100%;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@include large-break {
|
|
43
|
+
--cols: 4;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@include mid-break {
|
|
47
|
+
--gap: var(--base);
|
|
48
|
+
--cols: 2;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@include small-break {
|
|
52
|
+
--cols: 1;
|
|
53
|
+
|
|
54
|
+
&__wrap {
|
|
55
|
+
gap: var(--base);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Metadata } from 'next';
|
|
2
|
+
import type { SanitizedConfig } from 'payload/types';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
export declare const generateMetadata: ({ config: configPromise, }: {
|
|
5
|
+
config: Promise<SanitizedConfig>;
|
|
6
|
+
}) => Promise<Metadata>;
|
|
7
|
+
export declare const Dashboard: ({ config: configPromise, searchParams, }: {
|
|
8
|
+
config: Promise<SanitizedConfig>;
|
|
9
|
+
searchParams: {
|
|
10
|
+
[key: string]: string | string[];
|
|
11
|
+
};
|
|
12
|
+
}) => Promise<React.JSX.Element>;
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pages/Dashboard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAA;AACpC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAKpD,OAAO,KAAmB,MAAM,OAAO,CAAA;AASvC,eAAO,MAAM,gBAAgB,+BAE1B;IACD,MAAM,EAAE,QAAQ,eAAe,CAAC,CAAA;CACjC,KAAG,QAAQ,QAAQ,CAanB,CAAA;AAED,eAAO,MAAM,SAAS;YAIZ,QAAQ,eAAe,CAAC;;;;gCAkDjC,CAAA"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
Dashboard: function() {
|
|
13
|
+
return Dashboard;
|
|
14
|
+
},
|
|
15
|
+
generateMetadata: function() {
|
|
16
|
+
return generateMetadata;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _ui = require("@payloadcms/ui");
|
|
20
|
+
const _link = /*#__PURE__*/ _interop_require_default(require("next/link"));
|
|
21
|
+
const _utilities = require("payload/utilities");
|
|
22
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
23
|
+
const _getNextI18n = require("../../utilities/getNextI18n");
|
|
24
|
+
const _initPage = require("../../utilities/initPage");
|
|
25
|
+
const _meta = require("../../utilities/meta");
|
|
26
|
+
const _Default = require("./Default");
|
|
27
|
+
function _interop_require_default(obj) {
|
|
28
|
+
return obj && obj.__esModule ? obj : {
|
|
29
|
+
default: obj
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
33
|
+
if (typeof WeakMap !== "function") return null;
|
|
34
|
+
var cacheBabelInterop = new WeakMap();
|
|
35
|
+
var cacheNodeInterop = new WeakMap();
|
|
36
|
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
37
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
38
|
+
})(nodeInterop);
|
|
39
|
+
}
|
|
40
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
41
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
42
|
+
return obj;
|
|
43
|
+
}
|
|
44
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
45
|
+
return {
|
|
46
|
+
default: obj
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
50
|
+
if (cache && cache.has(obj)) {
|
|
51
|
+
return cache.get(obj);
|
|
52
|
+
}
|
|
53
|
+
var newObj = {
|
|
54
|
+
__proto__: null
|
|
55
|
+
};
|
|
56
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
57
|
+
for(var key in obj){
|
|
58
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
59
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
60
|
+
if (desc && (desc.get || desc.set)) {
|
|
61
|
+
Object.defineProperty(newObj, key, desc);
|
|
62
|
+
} else {
|
|
63
|
+
newObj[key] = obj[key];
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
newObj.default = obj;
|
|
68
|
+
if (cache) {
|
|
69
|
+
cache.set(obj, newObj);
|
|
70
|
+
}
|
|
71
|
+
return newObj;
|
|
72
|
+
}
|
|
73
|
+
const generateMetadata = async ({ config: configPromise })=>{
|
|
74
|
+
const config = await configPromise;
|
|
75
|
+
const { t } = await (0, _getNextI18n.getNextI18n)({
|
|
76
|
+
config
|
|
77
|
+
});
|
|
78
|
+
return (0, _meta.meta)({
|
|
79
|
+
config,
|
|
80
|
+
description: `${t('general:dashboard')} Payload`,
|
|
81
|
+
keywords: `${t('general:dashboard')}, Payload`,
|
|
82
|
+
title: t('general:dashboard')
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
const Dashboard = async ({ config: configPromise, searchParams })=>{
|
|
86
|
+
const { permissions, req } = await (0, _initPage.initPage)({
|
|
87
|
+
config: configPromise,
|
|
88
|
+
redirectUnauthenticatedUser: true,
|
|
89
|
+
route: '',
|
|
90
|
+
searchParams
|
|
91
|
+
});
|
|
92
|
+
const { payload: { config }, user } = req;
|
|
93
|
+
const CustomDashboardComponent = config.admin.components?.views?.Dashboard;
|
|
94
|
+
const visibleCollections = config.collections.reduce((acc, collection)=>{
|
|
95
|
+
if (!(0, _utilities.isEntityHidden)({
|
|
96
|
+
hidden: collection.admin.hidden,
|
|
97
|
+
user
|
|
98
|
+
})) {
|
|
99
|
+
acc.push(collection.slug);
|
|
100
|
+
}
|
|
101
|
+
return acc;
|
|
102
|
+
}, []);
|
|
103
|
+
const visibleGlobals = config.globals.reduce((acc, global)=>{
|
|
104
|
+
if (!(0, _utilities.isEntityHidden)({
|
|
105
|
+
hidden: global.admin.hidden,
|
|
106
|
+
user
|
|
107
|
+
})) {
|
|
108
|
+
acc.push(global.slug);
|
|
109
|
+
}
|
|
110
|
+
return acc;
|
|
111
|
+
}, []);
|
|
112
|
+
const componentProps = {
|
|
113
|
+
Link: _link.default,
|
|
114
|
+
config,
|
|
115
|
+
visibleCollections,
|
|
116
|
+
visibleGlobals
|
|
117
|
+
};
|
|
118
|
+
return /*#__PURE__*/ _react.default.createElement(_react.Fragment, null, /*#__PURE__*/ _react.default.createElement(_ui.HydrateClientUser, {
|
|
119
|
+
permissions: permissions,
|
|
120
|
+
user: user
|
|
121
|
+
}), /*#__PURE__*/ _react.default.createElement(_ui.RenderCustomComponent, {
|
|
122
|
+
CustomComponent: typeof CustomDashboardComponent === 'function' ? CustomDashboardComponent : undefined,
|
|
123
|
+
DefaultComponent: _Default.DefaultDashboard,
|
|
124
|
+
componentProps: componentProps
|
|
125
|
+
}));
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9wYWdlcy9EYXNoYm9hcmQvaW5kZXgudHN4Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgTWV0YWRhdGEgfSBmcm9tICduZXh0J1xuaW1wb3J0IHR5cGUgeyBTYW5pdGl6ZWRDb25maWcgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgeyBIeWRyYXRlQ2xpZW50VXNlciwgUmVuZGVyQ3VzdG9tQ29tcG9uZW50IH0gZnJvbSAnQHBheWxvYWRjbXMvdWknXG5pbXBvcnQgTGluayBmcm9tICduZXh0L2xpbmsnXG5pbXBvcnQgeyBpc0VudGl0eUhpZGRlbiB9IGZyb20gJ3BheWxvYWQvdXRpbGl0aWVzJ1xuaW1wb3J0IFJlYWN0LCB7IEZyYWdtZW50IH0gZnJvbSAncmVhY3QnXG5cbmltcG9ydCB0eXBlIHsgRGFzaGJvYXJkUHJvcHMgfSBmcm9tICcuL0RlZmF1bHQnXG5cbmltcG9ydCB7IGdldE5leHRJMThuIH0gZnJ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IsZ0JBQWdCQTs7QUFJeEIifQ==
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AdminViewComponent } from 'payload/config';
|
|
2
|
+
import type { SanitizedCollectionConfig, SanitizedGlobalConfig } from 'payload/types';
|
|
3
|
+
export declare const getCustomViewByKey: (views: SanitizedCollectionConfig['admin']['components']['views'] | SanitizedGlobalConfig['admin']['components']['views'], customViewKey: string) => AdminViewComponent;
|
|
4
|
+
//# sourceMappingURL=getCustomViewByKey.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCustomViewByKey.d.ts","sourceRoot":"","sources":["../../../src/pages/Document/getCustomViewByKey.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,KAAK,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAErF,eAAO,MAAM,kBAAkB,UAEzB,yBAAyB,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,GACzD,qBAAqB,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,iBAC1C,MAAM,KACpB,kBAaF,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "getCustomViewByKey", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return getCustomViewByKey;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const getCustomViewByKey = (views, customViewKey)=>{
|
|
12
|
+
return typeof views?.Edit === 'function' ? views?.Edit : typeof views?.Edit === 'object' && views?.Edit?.[customViewKey] && typeof views?.Edit?.[customViewKey] === 'function' ? views?.Edit?.[customViewKey] : views?.Edit?.[customViewKey] ? typeof views?.Edit?.[customViewKey] === 'object' && 'Component' in views?.Edit?.[customViewKey] && typeof views?.Edit?.[customViewKey].Component === 'function' && views?.Edit?.[customViewKey].Component : null;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9wYWdlcy9Eb2N1bWVudC9nZXRDdXN0b21WaWV3QnlLZXkudHN4Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgQWRtaW5WaWV3Q29tcG9uZW50IH0gZnJvbSAncGF5bG9hZC9jb25maWcnXG5pbXBvcnQgdHlwZSB7IFNhbml0aXplZENvbGxlY3Rpb25Db25maWcsIFNhbml0aXplZEdsb2JhbENvbmZpZyB9IGZyb20gJ3BheWxvYWQvdHlwZXMnXG5cbmV4cG9ydCBjb25zdCBnZXRDdXN0b21WaWV3QnlLZXkgPSAoXG4gIHZpZXdzOlxuICAgIHwgU2FuaXRpemVkQ29sbGVjdGlvbkNvbmZpZ1snYWRtaW4nXVsnY29tcG9uZW50cyddWyd2aWV3cyddXG4gICAgfCBTYW5pdGl6ZWRHbG9iYWxDb25maWdbJ2FkbWluJ11bJ2NvbXBvbmVudHMnXVsndmlld3MnXSxcbiAgY3VzdG9tVmlld0tleTogc3RyaW5nLFxuKTogQWRtaW5WaWV3Q29tcG9uZW50ID0+IHtcbiAgcmV0dXJuIHR5cGVvZiB2aWV3cz8uRWRpdCA9PT0gJ2Z1bmN0aW9uJ1xuICAgID8gdmlld3M/LkVkaXRcbiAgICA6IHR5cGVvZiB2aWV3cz8uRWRpdCA9PT0gJ29iamVjdCcgJiZcbiAgICAgICAgdmlld3M/LkVkaXQ/LltjdXN0b21WaWV3S2V5XSAmJlxuICAgICAgICB0eXBlb2Ygdmlld3M/LkVkaXQ/LltjdXN0b21WaWV3S2V5XSA9PT0gJ2Z1bmN0aW9uJ1xuICAgICAgPyB2aWV3cz8uRWRpdD8uW2N1c3RvbVZ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O0FBQ1YifQ==
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AdminViewComponent } from 'payload/config';
|
|
2
|
+
import type { SanitizedCollectionConfig, SanitizedGlobalConfig } from 'payload/types';
|
|
3
|
+
export declare const getCustomViewByPath: (views: SanitizedCollectionConfig['admin']['components']['views'] | SanitizedGlobalConfig['admin']['components']['views'], path: string) => AdminViewComponent;
|
|
4
|
+
//# sourceMappingURL=getCustomViewByPath.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCustomViewByPath.d.ts","sourceRoot":"","sources":["../../../src/pages/Document/getCustomViewByPath.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,KAAK,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAErF,eAAO,MAAM,mBAAmB,UAE1B,yBAAyB,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,GACzD,qBAAqB,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,QACnD,MAAM,KACX,kBAeF,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "getCustomViewByPath", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return getCustomViewByPath;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const getCustomViewByPath = (views, path)=>{
|
|
12
|
+
if (typeof views?.Edit === 'object' && typeof views?.Edit !== 'function') {
|
|
13
|
+
const foundViewConfig = Object.entries(views.Edit).find(([, view])=>{
|
|
14
|
+
if (typeof view === 'object' && typeof view !== 'function' && 'path' in view) {
|
|
15
|
+
return view.path === path;
|
|
16
|
+
}
|
|
17
|
+
return false;
|
|
18
|
+
})?.[1];
|
|
19
|
+
if (foundViewConfig && 'Component' in foundViewConfig) {
|
|
20
|
+
return foundViewConfig.Component;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return null;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9wYWdlcy9Eb2N1bWVudC9nZXRDdXN0b21WaWV3QnlQYXRoLnRzeCJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdHlwZSB7IEFkbWluVmlld0NvbXBvbmVudCB9IGZyb20gJ3BheWxvYWQvY29uZmlnJ1xuaW1wb3J0IHR5cGUgeyBTYW5pdGl6ZWRDb2xsZWN0aW9uQ29uZmlnLCBTYW5pdGl6ZWRHbG9iYWxDb25maWcgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5leHBvcnQgY29uc3QgZ2V0Q3VzdG9tVmlld0J5UGF0aCA9IChcbiAgdmlld3M6XG4gICAgfCBTYW5pdGl6ZWRDb2xsZWN0aW9uQ29uZmlnWydhZG1pbiddWydjb21wb25lbnRzJ11bJ3ZpZXdzJ11cbiAgICB8IFNhbml0aXplZEdsb2JhbENvbmZpZ1snYWRtaW4nXVsnY29tcG9uZW50cyddWyd2aWV3cyddLFxuICBwYXRoOiBzdHJpbmcsXG4pOiBBZG1pblZpZXdDb21wb25lbnQgPT4ge1xuICBpZiAodHlwZW9mIHZpZXdzPy5FZGl0ID09PSAnb2JqZWN0JyAmJiB0eXBlb2Ygdmlld3M/LkVkaXQgIT09ICdmdW5jdGlvbicpIHtcbiAgICBjb25zdCBmb3VuZFZpZXdDb25maWcgPSBPYmplY3QuZW50cmllcyh2aWV3cy5FZGl0KS5maW5kKChbLCB2aWV3XSkgPT4ge1xuICAgICAgaWYgKHR5cGVvZiB2aWV3ID09PSAnb2JqZWN0JyAmJiB0eXBlb2YgdmlldyAh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|
2
|
+
import type { I18n } from '@payloadcms/translations';
|
|
3
|
+
import type { Metadata } from 'next';
|
|
4
|
+
import type { SanitizedCollectionConfig, SanitizedConfig, SanitizedGlobalConfig } from 'payload/types';
|
|
5
|
+
export type GenerateEditViewMetadata = (args: {
|
|
6
|
+
collectionConfig?: SanitizedCollectionConfig;
|
|
7
|
+
config: SanitizedConfig;
|
|
8
|
+
globalConfig?: SanitizedGlobalConfig;
|
|
9
|
+
i18n: I18n;
|
|
10
|
+
isEditing: boolean;
|
|
11
|
+
}) => Promise<Metadata>;
|
|
12
|
+
export declare const getMetaBySegment: ({ config: configPromise, params, }: {
|
|
13
|
+
config: Promise<SanitizedConfig>;
|
|
14
|
+
params: {
|
|
15
|
+
collection?: string;
|
|
16
|
+
global?: string;
|
|
17
|
+
segments: string[];
|
|
18
|
+
};
|
|
19
|
+
}) => Promise<Metadata>;
|
|
20
|
+
//# sourceMappingURL=getMetaBySegment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getMetaBySegment.d.ts","sourceRoot":"","sources":["../../../src/pages/Document/getMetaBySegment.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAA;AACpC,OAAO,KAAK,EACV,yBAAyB,EACzB,eAAe,EACf,qBAAqB,EACtB,MAAM,eAAe,CAAA;AAKtB,MAAM,MAAM,wBAAwB,GAAG,CAAC,IAAI,EAAE;IAC5C,gBAAgB,CAAC,EAAE,yBAAyB,CAAA;IAC5C,MAAM,EAAE,eAAe,CAAA;IACvB,YAAY,CAAC,EAAE,qBAAqB,CAAA;IACpC,IAAI,EAAE,IAAI,CAAA;IACV,SAAS,EAAE,OAAO,CAAA;CACnB,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;AAEvB,eAAO,MAAM,gBAAgB;YAInB,QAAQ,eAAe,CAAC;YACxB;QACN,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,QAAQ,EAAE,MAAM,EAAE,CAAA;KACnB;MACC,QAAQ,QAAQ,CA2FnB,CAAA"}
|