@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,167 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "SelectComparison", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function() {
|
|
9
|
+
return SelectComparison;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
const _ui = require("@payloadcms/ui");
|
|
13
|
+
const _qs = /*#__PURE__*/ _interop_require_default(require("qs"));
|
|
14
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
15
|
+
const _shared = require("../shared");
|
|
16
|
+
require("./index.scss");
|
|
17
|
+
function _interop_require_default(obj) {
|
|
18
|
+
return obj && obj.__esModule ? obj : {
|
|
19
|
+
default: obj
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
23
|
+
if (typeof WeakMap !== "function") return null;
|
|
24
|
+
var cacheBabelInterop = new WeakMap();
|
|
25
|
+
var cacheNodeInterop = new WeakMap();
|
|
26
|
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
27
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
28
|
+
})(nodeInterop);
|
|
29
|
+
}
|
|
30
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
31
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
32
|
+
return obj;
|
|
33
|
+
}
|
|
34
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
35
|
+
return {
|
|
36
|
+
default: obj
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
40
|
+
if (cache && cache.has(obj)) {
|
|
41
|
+
return cache.get(obj);
|
|
42
|
+
}
|
|
43
|
+
var newObj = {
|
|
44
|
+
__proto__: null
|
|
45
|
+
};
|
|
46
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
47
|
+
for(var key in obj){
|
|
48
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
49
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
50
|
+
if (desc && (desc.get || desc.set)) {
|
|
51
|
+
Object.defineProperty(newObj, key, desc);
|
|
52
|
+
} else {
|
|
53
|
+
newObj[key] = obj[key];
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
newObj.default = obj;
|
|
58
|
+
if (cache) {
|
|
59
|
+
cache.set(obj, newObj);
|
|
60
|
+
}
|
|
61
|
+
return newObj;
|
|
62
|
+
}
|
|
63
|
+
const baseClass = 'compare-version';
|
|
64
|
+
const maxResultsPerRequest = 10;
|
|
65
|
+
const baseOptions = [
|
|
66
|
+
_shared.mostRecentVersionOption
|
|
67
|
+
];
|
|
68
|
+
const SelectComparison = (props)=>{
|
|
69
|
+
const { baseURL, onChange, parentID, publishedDoc, value, versionID } = props;
|
|
70
|
+
const { admin: { dateFormat } } = (0, _ui.useConfig)();
|
|
71
|
+
const [options, setOptions] = (0, _react.useState)(baseOptions);
|
|
72
|
+
const [lastLoadedPage, setLastLoadedPage] = (0, _react.useState)(1);
|
|
73
|
+
const [errorLoading, setErrorLoading] = (0, _react.useState)('');
|
|
74
|
+
const { i18n, t } = (0, _ui.useTranslation)();
|
|
75
|
+
const getResults = (0, _react.useCallback)(async ({ lastLoadedPage: lastLoadedPageArg })=>{
|
|
76
|
+
const query = {
|
|
77
|
+
depth: 0,
|
|
78
|
+
limit: maxResultsPerRequest,
|
|
79
|
+
page: lastLoadedPageArg,
|
|
80
|
+
where: {
|
|
81
|
+
and: [
|
|
82
|
+
{
|
|
83
|
+
id: {
|
|
84
|
+
not_equals: versionID
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
if (parentID) {
|
|
91
|
+
query.where.and.push({
|
|
92
|
+
parent: {
|
|
93
|
+
equals: parentID
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
const search = _qs.default.stringify(query);
|
|
98
|
+
const response = await fetch(`${baseURL}?${search}`, {
|
|
99
|
+
credentials: 'include',
|
|
100
|
+
headers: {
|
|
101
|
+
'Accept-Language': i18n.language
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
if (response.ok) {
|
|
105
|
+
const data = await response.json();
|
|
106
|
+
if (data.docs.length > 0) {
|
|
107
|
+
setOptions((existingOptions)=>[
|
|
108
|
+
...existingOptions,
|
|
109
|
+
...data.docs.map((doc)=>({
|
|
110
|
+
label: (0, _ui.formatDate)(doc.updatedAt, dateFormat, i18n.language),
|
|
111
|
+
value: doc.id
|
|
112
|
+
}))
|
|
113
|
+
]);
|
|
114
|
+
setLastLoadedPage(data.page);
|
|
115
|
+
}
|
|
116
|
+
} else {
|
|
117
|
+
setErrorLoading(t('error:unspecific'));
|
|
118
|
+
}
|
|
119
|
+
}, [
|
|
120
|
+
dateFormat,
|
|
121
|
+
baseURL,
|
|
122
|
+
parentID,
|
|
123
|
+
versionID,
|
|
124
|
+
t,
|
|
125
|
+
i18n
|
|
126
|
+
]);
|
|
127
|
+
(0, _react.useEffect)(()=>{
|
|
128
|
+
getResults({
|
|
129
|
+
lastLoadedPage: 1
|
|
130
|
+
});
|
|
131
|
+
}, [
|
|
132
|
+
getResults
|
|
133
|
+
]);
|
|
134
|
+
(0, _react.useEffect)(()=>{
|
|
135
|
+
if (publishedDoc?._status === 'published') setOptions((currentOptions)=>[
|
|
136
|
+
_shared.publishedVersionOption,
|
|
137
|
+
...currentOptions
|
|
138
|
+
]);
|
|
139
|
+
}, [
|
|
140
|
+
publishedDoc
|
|
141
|
+
]);
|
|
142
|
+
return /*#__PURE__*/ _react.default.createElement("div", {
|
|
143
|
+
className: [
|
|
144
|
+
_ui.fieldBaseClass,
|
|
145
|
+
baseClass,
|
|
146
|
+
errorLoading && 'error-loading'
|
|
147
|
+
].filter(Boolean).join(' ')
|
|
148
|
+
}, /*#__PURE__*/ _react.default.createElement("div", {
|
|
149
|
+
className: `${baseClass}__label`
|
|
150
|
+
}, t('version:compareVersion')), !errorLoading && /*#__PURE__*/ _react.default.createElement(_ui.ReactSelect, {
|
|
151
|
+
isClearable: false,
|
|
152
|
+
isSearchable: false,
|
|
153
|
+
onChange: onChange,
|
|
154
|
+
onMenuScrollToBottom: ()=>{
|
|
155
|
+
getResults({
|
|
156
|
+
lastLoadedPage: lastLoadedPage + 1
|
|
157
|
+
});
|
|
158
|
+
},
|
|
159
|
+
options: options,
|
|
160
|
+
placeholder: t('version:selectVersionToCompare'),
|
|
161
|
+
value: value
|
|
162
|
+
}), errorLoading && /*#__PURE__*/ _react.default.createElement("div", {
|
|
163
|
+
className: `${baseClass}__error-loading`
|
|
164
|
+
}, errorLoading));
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9wYWdlcy9WZXJzaW9uL1NlbGVjdENvbXBhcmlzb24vaW5kZXgudHN4Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2UgY2xpZW50J1xuaW1wb3J0IHR5cGUgeyB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cHRpb25zXSA9IHVzZVN0YXRlKGJhc2VPcHRpb25zKVxuICBjb25zdCBbbGFzdExvYWRlZFBhZ2UsIHNldExhc3RMb2FkZWRQYWdlXSA9IHVzZVN0YXRlKDEpXG4gIGNvbnN0IFtlcnJvckxvYWRpbmcsIHNldEVycm9yTG9hZGluZ10gPSB1c2VTdGF0ZSgnJylcbiAgY29uc3QgeyBpMThuLCB0IH0gPSB1c2VUcmFuc2xhdGlvbigpXG5cbiAgY29uc3QgZ2V0UmVzdWx0cyA9IHVzZUNhbGxiYWNrKFxuICAgIGFzeW5jICh7IGxhc3RMb2FkZWRQYWdlOiBsYXN0TG9hZGVkUGFnZUFyZyB9KSA9PiB7XG4gICAgICBjb25zdCBxdWVyeToge1xuICAgICAgICBba2V5OiBzdHJpbmddOiB1bmtub3duXG4gICAgICAgIHdoZXJlOiBXaGVyZVxuICAgICAgfSA9IHtcbiAgICAgICAgZGVwdGg6IDAsXG4gICAgICAgIGxpbWl0OiBtYXhSZXN1bHRzUGVyUmVxdWVzdCxcbiAgICAgICAgcGFnZTogbGFzdExvYWRlZFBhZ2VBcmcsXG4gICAgICAgIHdoZXJlOiB7XG4gICAgICAgICAgYW5kOiBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGlkOiB7XG4gICAgICAgICAgICAgICAgbm90X2VxdWFsczogdmVyc2lvbklELFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdLFxuICAgICAgICB9LFxuICAgICAgfVxuXG4gICAgICBpZiAocGFyZW50SUQpIHtcbiAgICAgICAgcXVlcnkud2hlcmUuYW5kLnB1c2goe1xuICAgICAgICAgIHBhcmVudDoge1xuICAgICAgICAgICAgZXF1YWxzOiBwYXJlbnRJRCxcbiAgICAgICAgICB9LFxuICAgICAgICB9KVxuICAgICAgfVxuXG4gICAgICBjb25zdCBzZWFyY2ggPSBxcy5zdHJpbmdpZnkocXVlcnkpXG5cbiAgICAgIGNvbnN0IHJlc3Bv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error-500);
|
|
4
|
+
min-height: calc(var(--base) * 2);
|
|
5
|
+
padding: calc(var(--base) * 0.5) calc(var(--base) * 0.75);
|
|
6
|
+
background-color: var(--theme-error-500);
|
|
7
|
+
color: var(--theme-elevation-0);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&__label {
|
|
11
|
+
margin-bottom: calc(var(--base) * 0.25);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { PaginatedDocs } from 'payload/database';
|
|
2
|
+
import type { SanitizedCollectionConfig } from 'payload/types';
|
|
3
|
+
import type { CompareOption } from '../Default/types';
|
|
4
|
+
export type Props = {
|
|
5
|
+
baseURL: string;
|
|
6
|
+
onChange: (val: CompareOption) => void;
|
|
7
|
+
parentID?: number | string;
|
|
8
|
+
publishedDoc: any;
|
|
9
|
+
value: CompareOption;
|
|
10
|
+
versionID: string;
|
|
11
|
+
};
|
|
12
|
+
type CLEAR = {
|
|
13
|
+
required: boolean;
|
|
14
|
+
type: 'CLEAR';
|
|
15
|
+
};
|
|
16
|
+
type ADD = {
|
|
17
|
+
collection: SanitizedCollectionConfig;
|
|
18
|
+
data: PaginatedDocs<any>;
|
|
19
|
+
type: 'ADD';
|
|
20
|
+
};
|
|
21
|
+
export type Action = ADD | CLEAR;
|
|
22
|
+
export type ValueWithRelation = {
|
|
23
|
+
relationTo: string;
|
|
24
|
+
value: string;
|
|
25
|
+
};
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/pages/Version/SelectComparison/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAE9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAErD,MAAM,MAAM,KAAK,GAAG;IAClB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,IAAI,CAAA;IACtC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC1B,YAAY,EAAE,GAAG,CAAA;IACjB,KAAK,EAAE,aAAa,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,OAAO,CAAA;IACjB,IAAI,EAAE,OAAO,CAAA;CACd,CAAA;AAED,KAAK,GAAG,GAAG;IACT,UAAU,EAAE,yBAAyB,CAAA;IACrC,IAAI,EAAE,aAAa,CAAC,GAAG,CAAC,CAAA;IACxB,IAAI,EAAE,KAAK,CAAA;CACZ,CAAA;AAED,MAAM,MAAM,MAAM,GAAG,GAAG,GAAG,KAAK,CAAA;AAEhC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;CACd,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/pages/Version/SelectLocales/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAEpC,OAAO,cAAc,CAAA;AAIrB,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA4BzC,CAAA"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "SelectLocales", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return SelectLocales;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _ui = require("@payloadcms/ui");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_default(require("react"));
|
|
13
|
+
require("./index.scss");
|
|
14
|
+
function _interop_require_default(obj) {
|
|
15
|
+
return obj && obj.__esModule ? obj : {
|
|
16
|
+
default: obj
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
const baseClass = 'select-version-locales';
|
|
20
|
+
const SelectLocales = ({ onChange, options, value })=>{
|
|
21
|
+
const { t } = (0, _ui.useTranslation)();
|
|
22
|
+
const { code } = (0, _ui.useLocale)();
|
|
23
|
+
const format = (items)=>{
|
|
24
|
+
return items.map((item)=>{
|
|
25
|
+
if (typeof item.label === 'string') return item;
|
|
26
|
+
if (typeof item.label !== 'string' && item.label[code]) {
|
|
27
|
+
return {
|
|
28
|
+
label: item.label[code],
|
|
29
|
+
value: item.value
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
return /*#__PURE__*/ _react.default.createElement("div", {
|
|
35
|
+
className: baseClass
|
|
36
|
+
}, /*#__PURE__*/ _react.default.createElement("div", {
|
|
37
|
+
className: `${baseClass}__label`
|
|
38
|
+
}, t('version:showLocales')), /*#__PURE__*/ _react.default.createElement(_ui.ReactSelect, {
|
|
39
|
+
isMulti: true,
|
|
40
|
+
onChange: onChange,
|
|
41
|
+
options: format(options),
|
|
42
|
+
placeholder: t('version:selectLocales'),
|
|
43
|
+
value: format(value)
|
|
44
|
+
}));
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9wYWdlcy9WZXJzaW9uL1NlbGVjdExvY2FsZXMvaW5kZXgudHN4Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHVzZVRyYW5zbGF0aW9uIH0gZnJvbSAnQHBheWxvYWRjbXMvdWknXG5pbXBvcnQge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FPRCxLQUFLQyxLQUFLLENBQUNOLEtBQUs7b0JBQ3ZCSCxPQUFPUSxLQUFLUixLQUFLO2dCQUNuQjtZQUNGO1FBQ0Y7SUFDRjtJQUVBLHFCQUNFLDZCQUFDVTtRQUFJQyxXQUFXZDtxQkFDZCw2QkFBQ2E7UUFBSUMsV0FBVyxDQUFDLEVBQUVkLFVBQVUsT0FBTyxDQUFDO09BQUdJLEVBQUUsdUNBQzFDLDZCQUFDVyxlQUFXO1FBQ1ZDLFNBQUFBO1FBQ0FmLFVBQVVBO1FBQ1ZDLFNBQVNNLE9BQU9OO1FBQ2hCZSxhQUFhYixFQUFFO1FBQ2ZELE9BQU9LLE9BQU9MOztBQUl0QiJ9
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/pages/Version/SelectLocales/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAE5C,MAAM,MAAM,KAAK,GAAG;IAClB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;IACrC,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,KAAK,EAAE,MAAM,EAAE,CAAA;CAChB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pages/Version/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAA;AAK5D,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAgHzD,CAAA"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "VersionView", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return VersionView;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _navigation = require("next/navigation");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_default(require("react"));
|
|
13
|
+
const _sanitizeEditViewProps = require("../Edit/sanitizeEditViewProps");
|
|
14
|
+
const _Default = require("./Default");
|
|
15
|
+
function _interop_require_default(obj) {
|
|
16
|
+
return obj && obj.__esModule ? obj : {
|
|
17
|
+
default: obj
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
const VersionView = async (props)=>{
|
|
21
|
+
const { config, params, payload, permissions, user } = props;
|
|
22
|
+
const versionID = params.segments[2];
|
|
23
|
+
const collectionConfig = 'collectionConfig' in props && props?.collectionConfig;
|
|
24
|
+
const globalConfig = 'globalConfig' in props && props?.globalConfig;
|
|
25
|
+
const id = 'id' in props ? props.id : undefined;
|
|
26
|
+
const collectionSlug = collectionConfig?.slug;
|
|
27
|
+
const globalSlug = globalConfig?.slug;
|
|
28
|
+
const { localization } = config;
|
|
29
|
+
let docPermissions;
|
|
30
|
+
let slug;
|
|
31
|
+
let doc;
|
|
32
|
+
let publishedDoc;
|
|
33
|
+
let mostRecentDoc;
|
|
34
|
+
if (collectionSlug) {
|
|
35
|
+
slug = collectionSlug;
|
|
36
|
+
docPermissions = permissions.collections[collectionSlug];
|
|
37
|
+
try {
|
|
38
|
+
doc = await payload.findVersionByID({
|
|
39
|
+
id: versionID,
|
|
40
|
+
collection: slug,
|
|
41
|
+
depth: 1,
|
|
42
|
+
locale: '*'
|
|
43
|
+
});
|
|
44
|
+
publishedDoc = await payload.findByID({
|
|
45
|
+
id,
|
|
46
|
+
collection: slug,
|
|
47
|
+
depth: 1,
|
|
48
|
+
draft: false,
|
|
49
|
+
locale: '*'
|
|
50
|
+
});
|
|
51
|
+
mostRecentDoc = await payload.findByID({
|
|
52
|
+
id,
|
|
53
|
+
collection: slug,
|
|
54
|
+
depth: 1,
|
|
55
|
+
draft: true,
|
|
56
|
+
locale: '*'
|
|
57
|
+
});
|
|
58
|
+
} catch (error) {
|
|
59
|
+
return (0, _navigation.notFound)();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
if (globalSlug) {
|
|
63
|
+
slug = globalSlug;
|
|
64
|
+
docPermissions = permissions.globals[globalSlug];
|
|
65
|
+
try {
|
|
66
|
+
doc = payload.findGlobalVersionByID({
|
|
67
|
+
id: versionID,
|
|
68
|
+
slug,
|
|
69
|
+
depth: 1,
|
|
70
|
+
locale: '*'
|
|
71
|
+
});
|
|
72
|
+
publishedDoc = payload.findGlobal({
|
|
73
|
+
slug,
|
|
74
|
+
depth: 1,
|
|
75
|
+
draft: false,
|
|
76
|
+
locale: '*'
|
|
77
|
+
});
|
|
78
|
+
mostRecentDoc = payload.findGlobal({
|
|
79
|
+
slug,
|
|
80
|
+
depth: 1,
|
|
81
|
+
draft: true,
|
|
82
|
+
locale: '*'
|
|
83
|
+
});
|
|
84
|
+
} catch (error) {
|
|
85
|
+
return (0, _navigation.notFound)();
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
const localeOptions = localization && localization?.locales && localization.locales.map(({ code, label })=>({
|
|
89
|
+
label: typeof label === 'string' ? label : '',
|
|
90
|
+
value: code
|
|
91
|
+
}));
|
|
92
|
+
if (!doc) {
|
|
93
|
+
return (0, _navigation.notFound)();
|
|
94
|
+
}
|
|
95
|
+
const clientSideProps = (0, _sanitizeEditViewProps.sanitizeEditViewProps)(props);
|
|
96
|
+
return /*#__PURE__*/ _react.default.createElement(_Default.DefaultVersionView, {
|
|
97
|
+
...clientSideProps,
|
|
98
|
+
doc: doc,
|
|
99
|
+
docPermissions: docPermissions,
|
|
100
|
+
id: id,
|
|
101
|
+
initialComparisonDoc: mostRecentDoc,
|
|
102
|
+
localeOptions: localeOptions,
|
|
103
|
+
mostRecentDoc: mostRecentDoc,
|
|
104
|
+
permissions: permissions,
|
|
105
|
+
publishedDoc: publish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oe1xuICAgICAgICBpZCxcbiAgICAgICAgY29sbGVjdGlvbjogc2x1ZyxcbiAgICAgICAgZGVwdGg6IDEsXG4gICAgICAgIGRyYWZ0OiBmYWxzZSxcbiAgICAgICAgbG9jYWxlOiAnKicsXG4gICAgICB9KVxuXG4gICAgICBtb3N0UmVjZW50RG9jID0gYXdhaXQgcGF5bG9hZC5maW5kQnlJRCh7XG4gICAgICAgIGlkLFxuICAgICAgICBjb2xsZWN0aW9uOiBzbHVnLFxuICAgICAgICBkZXB0aDogMSxcbiAgICAgICAgZHJhZnQ6IHRydWUsXG4gICAgICAgIGxvY2FsZTogJyonLFxuICAgICAgfSlcbiAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgcmV0dXJuIG5vdEZvdW5kKClcbiAgICB9XG4gIH1cblxuICBpZiAoZ2xvYmFsU2x1Zykge1xuICAgIHNsdWcgPSBnbG9iYWxTbHVnXG4gICAgZG9jUGVybWlzc2lvbnMgPSBwZXJtaXNzaW9ucy5nbG9iYWxzW2dsb2JhbFNsdWddXG5cbiAgICB0cnkge1xuICAgICAgZG9jID0gcGF5bG9hZC5maW5kR2xvYmFsVmVyc2lvbkJ5SUQoe1xuICAgICAgICBpZDogdmVyc2lvbklELFxuICAgICAgICBzbHVnLFxuICAgICAgICBkZXB0aDogMSxcbiAgICAgICAgbG9jYWxlOiAnKicsXG4gICAgICB9KVxuXG4gICAgICBwdWJsaXNoZWREb2MgPSBwYXlsb2FkLmZpbmRHbG9iYWwoe1xuICAgICAgICBzbHVnLFxuICAgICAgICBkZXB0aDogMSxcbiAgICAgICAgZHJhZnQ6IGZhbHNlLFxuICAgICAgICBsb2NhbGU6ICcqJyxcbiAgICAgIH0pXG5cbiAgICAgIG1vc3RSZWNlbnREb2MgPSBwYXlsb2FkLmZpbmRHbG9iYWwoe1xuICAgICAgICBzbHVnLFxuICAgICAgICBkZXB0aDogMSxcbiAgICAgICAgZHJhZnQ6IHRydWUsXG4gICAgICAgIGxvY2FsZTogJyonLF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9B,CAAA"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "generateMetadata", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return generateMetadata;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _translations = require("@payloadcms/translations");
|
|
12
|
+
const _ui = require("@payloadcms/ui");
|
|
13
|
+
const _meta = require("../../utilities/meta");
|
|
14
|
+
const generateMetadata = async ({ collectionConfig, config, globalConfig, i18n })=>{
|
|
15
|
+
const { t } = i18n;
|
|
16
|
+
let title = '';
|
|
17
|
+
let description = '';
|
|
18
|
+
const keywords = '';
|
|
19
|
+
const doc = {} // TODO: figure this out
|
|
20
|
+
;
|
|
21
|
+
const formattedCreatedAt = doc?.createdAt ? (0, _ui.formatDate)(doc.createdAt, config?.admin?.dateFormat, i18n?.language) : '';
|
|
22
|
+
if (collectionConfig) {
|
|
23
|
+
const useAsTitle = collectionConfig?.admin?.useAsTitle || 'id';
|
|
24
|
+
const entityLabel = (0, _translations.getTranslation)(collectionConfig.labels.singular, i18n);
|
|
25
|
+
const titleFromData = doc?.[useAsTitle];
|
|
26
|
+
title = `${t('version:version')}${formattedCreatedAt ? ` - ${formattedCreatedAt}` : ''}${titleFromData ? ` - ${titleFromData}` : ''} - ${entityLabel}`;
|
|
27
|
+
description = t('version:viewingVersion', {
|
|
28
|
+
documentTitle: doc[useAsTitle],
|
|
29
|
+
entityLabel
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
if (globalConfig) {
|
|
33
|
+
const entityLabel = (0, _translations.getTranslation)(globalConfig.label, i18n);
|
|
34
|
+
title = `${t('version:version')}${formattedCreatedAt ? ` - ${formattedCreatedAt}` : ''}${entityLabel}`;
|
|
35
|
+
description = t('version:viewingVersionGlobal', {
|
|
36
|
+
entityLabel
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
return (0, _meta.meta)({
|
|
40
|
+
config,
|
|
41
|
+
description,
|
|
42
|
+
keywords,
|
|
43
|
+
title
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9wYWdlcy9WZXJzaW9uL21ldGEudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR5cGUgeyBNZXRhZGF0YSB9IGZyb20gJ25leHQnXG5cbmltcG9ydCB7IGdldFRyYW5zbGF0aW9uIH0gZnJvbSAnQHBheWxvYWRjbXMvdHJhbnNsYXRpb25zJ1xuaW1wb3J0IHsgZm9ybWF0RGF0ZSB9IGZyb20gJ0BwYXlsb2FkY21zL3VpJ1xuXG5pbXBvcnQgdHlwZSB7IEdlbmVyYXRlRWRpdFZpZXdNZXRhZGF0YSB9IGZyb20gJy4uL0RvY3VtZW50L2dldE1ldGFCeVNlZ21lbnQnXG5cbmltcG9ydCB7IG1ldGEgfSBmcm9tICcuLi8uLi91dGlsaXRpZXMvbWV0YSdcblxuZXhwb3J0IGNvbnN0IGdlbmVyYXRlTWV0YWRhdGE6IEdlbmVyYXRlRWRpdFZpZXdNZXRhZGF0YSA9IGFzeW5jICh7XG4gIGNvbGxlY3Rpb25Db25maWcsXG4gIGNvbmZpZyxcbiAgZ2xvYmFsQ29uZmlnLFxuICBpMThuLFxufSk6IFByb21pc2U8TWV0YWRhdGE+ID0+IHtcbiAgY29uc3QgeyB0IH0gPSBpMThuXG5cbiAgbGV0IHRpdGxlOiBzdHJpbmcgPSAnJ1xuICBsZXQgZGVzY3JpcHRpb246IHN0cmluZyA9ICcnXG4gIGNvbnN0IGtleXdvcmRzOiBzdHJpbmcgPSAnJ1xuXG4gIGNvbnN0IGRvYzogYW55ID0ge30gLy8gVE9ETzogZmlndXJlIHRoaXMgb3V0XG5c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AAAA,eAAO,MAAM,uBAAuB;;;CAGnC,CAAA;AAED,eAAO,MAAM,sBAAsB;;;CAGlC,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
mostRecentVersionOption: function() {
|
|
13
|
+
return mostRecentVersionOption;
|
|
14
|
+
},
|
|
15
|
+
publishedVersionOption: function() {
|
|
16
|
+
return publishedVersionOption;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const mostRecentVersionOption = {
|
|
20
|
+
label: 'Most recent',
|
|
21
|
+
value: 'mostRecent'
|
|
22
|
+
};
|
|
23
|
+
const publishedVersionOption = {
|
|
24
|
+
label: 'Most recently published',
|
|
25
|
+
value: 'published'
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9wYWdlcy9WZXJzaW9uL3NoYXJlZC50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY29uc3QgbW9zdFJlY2VudFZlcnNpb25PcHRpb24gPSB7XG4gIGxhYmVsOiAnTW9zdCByZWNlbnQnLFxuICB2YWx1ZTogJ21vc3RSZWNlbnQnLFxufVxuXG5leHBvcnQgY29uc3QgcHVibGlzaGVkVmVyc2lvbk9wdGlvbiA9IHtcbiAgbGFiZWw6ICdNb3N0IHJlY2VudGx5IHB1Ymxpc2hlZCcsXG4gIHZhbHVlOiAncHVibGlzaGVkJyxcbn1cbiJdLCJuYW1lcyI6WyJtb3N0UmVjZW50VmVyc2lvbk9wdGlvbiIsInB1Ymxpc2hlZFZlcnNpb25PcHRpb24iLCJsYWJlbCIsInZhbHVlIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztJQUFhQSx1QkFBdUI7ZUFBdkJBOztJQUtBQyxzQkFBc0I7ZUFBdEJBOzs7QUFMTixNQUFNRCwwQkFBMEI7SUFDckNFLE9BQU87SUFDUEMsT0FBTztBQUNUO0FBRU8sTUFBTUYseUJBQXlCO0lBQ3BDQyxPQUFPO0lBQ1BDLE9BQU87QUFDVCJ9
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { I18n } from '@payloadcms/translations';
|
|
2
|
+
import type { Column } from '@payloadcms/ui';
|
|
3
|
+
import type { SanitizedCollectionConfig, SanitizedConfig, SanitizedGlobalConfig } from 'payload/types';
|
|
4
|
+
export declare const buildVersionColumns: ({ collectionConfig, config, docID, globalConfig, i18n: { t }, i18n, }: {
|
|
5
|
+
collectionConfig?: SanitizedCollectionConfig;
|
|
6
|
+
config: SanitizedConfig;
|
|
7
|
+
docID?: number | string;
|
|
8
|
+
globalConfig?: SanitizedGlobalConfig;
|
|
9
|
+
i18n: I18n;
|
|
10
|
+
}) => Column[];
|
|
11
|
+
//# sourceMappingURL=buildColumns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildColumns.d.ts","sourceRoot":"","sources":["../../../src/pages/Versions/buildColumns.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,KAAK,EACV,yBAAyB,EACzB,eAAe,EACf,qBAAqB,EACtB,MAAM,eAAe,CAAA;AAStB,eAAO,MAAM,mBAAmB;uBAQX,yBAAyB;YACpC,eAAe;YACf,MAAM,GAAG,MAAM;mBACR,qBAAqB;UAC9B,IAAI;MACR,MAAM,EAqCT,CAAA"}
|