@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,153 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
function _export(target, all) {
|
|
7
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: all[name]
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
_export(exports, {
|
|
13
|
+
RelationshipProvider: function() {
|
|
14
|
+
return RelationshipProvider;
|
|
15
|
+
},
|
|
16
|
+
useListRelationships: function() {
|
|
17
|
+
return useListRelationships;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
const _ui = require("@payloadcms/ui");
|
|
21
|
+
const _qs = /*#__PURE__*/ _interop_require_default(require("qs"));
|
|
22
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
23
|
+
const _reducer = require("./reducer");
|
|
24
|
+
function _interop_require_default(obj) {
|
|
25
|
+
return obj && obj.__esModule ? obj : {
|
|
26
|
+
default: obj
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
30
|
+
if (typeof WeakMap !== "function") return null;
|
|
31
|
+
var cacheBabelInterop = new WeakMap();
|
|
32
|
+
var cacheNodeInterop = new WeakMap();
|
|
33
|
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
34
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
35
|
+
})(nodeInterop);
|
|
36
|
+
}
|
|
37
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
38
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
39
|
+
return obj;
|
|
40
|
+
}
|
|
41
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
42
|
+
return {
|
|
43
|
+
default: obj
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
47
|
+
if (cache && cache.has(obj)) {
|
|
48
|
+
return cache.get(obj);
|
|
49
|
+
}
|
|
50
|
+
var newObj = {
|
|
51
|
+
__proto__: null
|
|
52
|
+
};
|
|
53
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
54
|
+
for(var key in obj){
|
|
55
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
56
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
57
|
+
if (desc && (desc.get || desc.set)) {
|
|
58
|
+
Object.defineProperty(newObj, key, desc);
|
|
59
|
+
} else {
|
|
60
|
+
newObj[key] = obj[key];
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
newObj.default = obj;
|
|
65
|
+
if (cache) {
|
|
66
|
+
cache.set(obj, newObj);
|
|
67
|
+
}
|
|
68
|
+
return newObj;
|
|
69
|
+
}
|
|
70
|
+
const Context = /*#__PURE__*/ (0, _react.createContext)({});
|
|
71
|
+
const RelationshipProvider = ({ children })=>{
|
|
72
|
+
const [documents, dispatchDocuments] = (0, _react.useReducer)(_reducer.reducer, {});
|
|
73
|
+
const debouncedDocuments = (0, _ui.useDebounce)(documents, 100);
|
|
74
|
+
const config = (0, _ui.useConfig)();
|
|
75
|
+
const { i18n } = (0, _ui.useTranslation)();
|
|
76
|
+
const { code: locale } = (0, _ui.useLocale)();
|
|
77
|
+
const prevLocale = (0, _react.useRef)(locale);
|
|
78
|
+
const { routes: { api }, serverURL } = config;
|
|
79
|
+
const loadRelationshipDocs = (0, _react.useCallback)(async (reloadAll = false)=>{
|
|
80
|
+
Object.entries(debouncedDocuments).forEach(async ([slug, docs])=>{
|
|
81
|
+
const idsToLoad = [];
|
|
82
|
+
Object.entries(docs).forEach(([id, value])=>{
|
|
83
|
+
if (value === null || reloadAll) {
|
|
84
|
+
idsToLoad.push(id);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
if (idsToLoad.length > 0) {
|
|
88
|
+
const url = `${serverURL}${api}/${slug}`;
|
|
89
|
+
const params = {
|
|
90
|
+
depth: 0,
|
|
91
|
+
limit: 250,
|
|
92
|
+
locale,
|
|
93
|
+
'where[id][in]': idsToLoad
|
|
94
|
+
};
|
|
95
|
+
const query = _qs.default.stringify(params, {
|
|
96
|
+
addQueryPrefix: true
|
|
97
|
+
});
|
|
98
|
+
const result = await fetch(`${url}${query}`, {
|
|
99
|
+
credentials: 'include',
|
|
100
|
+
headers: {
|
|
101
|
+
'Accept-Language': i18n.language
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
if (result.ok) {
|
|
105
|
+
const json = await result.json();
|
|
106
|
+
if (json.docs) {
|
|
107
|
+
dispatchDocuments({
|
|
108
|
+
docs: json.docs,
|
|
109
|
+
idsToLoad,
|
|
110
|
+
relationTo: slug,
|
|
111
|
+
type: 'ADD_LOADED'
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
} else {
|
|
115
|
+
dispatchDocuments({
|
|
116
|
+
docs: [],
|
|
117
|
+
idsToLoad,
|
|
118
|
+
relationTo: slug,
|
|
119
|
+
type: 'ADD_LOADED'
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
}, [
|
|
125
|
+
debouncedDocuments,
|
|
126
|
+
serverURL,
|
|
127
|
+
api,
|
|
128
|
+
i18n,
|
|
129
|
+
locale
|
|
130
|
+
]);
|
|
131
|
+
(0, _react.useEffect)(()=>{
|
|
132
|
+
loadRelationshipDocs(locale && prevLocale.current !== locale);
|
|
133
|
+
prevLocale.current = locale;
|
|
134
|
+
}, [
|
|
135
|
+
locale,
|
|
136
|
+
loadRelationshipDocs
|
|
137
|
+
]);
|
|
138
|
+
const getRelationships = (0, _react.useCallback)(async (relationships)=>{
|
|
139
|
+
dispatchDocuments({
|
|
140
|
+
docs: relationships,
|
|
141
|
+
type: 'REQUEST'
|
|
142
|
+
});
|
|
143
|
+
}, []);
|
|
144
|
+
return /*#__PURE__*/ _react.default.createElement(Context.Provider, {
|
|
145
|
+
value: {
|
|
146
|
+
documents,
|
|
147
|
+
getRelationships
|
|
148
|
+
}
|
|
149
|
+
}, children);
|
|
150
|
+
};
|
|
151
|
+
const useListRelationships = ()=>(0, _react.useContext)(Context);
|
|
152
|
+
|
|
153
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9wYWdlcy9MaXN0L0RlZmF1bHQvUmVsYXRpb25zaGlwUHJvdmlkZXIvaW5kZXgudHN4Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2UgY2xpZW50J1xuaW1wb3J0IHR5cGUgeyBUeXBlV2l0aElEIH0gZnJvbSAncGF5bG9hZC90eXBlcydcblxuaW1wb3J0IHsgdXNlQ29uZmlnLCB1c2VEZWJvdW5jZSwgdXNlTG9jYWxlLCB1c2VUcmFuc2xhdGlvbiB9IGZyb20gJ0BwYXlsb2FkY21zL3VpJ1xuaW1wb3J0IHF1ZXJ5c3RyaW5nIGZyb20gJ3FzJ1xuaW1wb3J0IFJlYWN0LCB7IGNyZWF0ZUNvbnRleHQsIHVzZUNhbGxiYWNrLCB1c2VDb250ZXh0LCB1c2VFZmZlY3QsIHVzZVJlZHVjZX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GFyYW1zLCB7IGFkZFF1ZXJ5UHJlZml4OiB0cnVlIH0pXG4gICAgICAgICAgY29uc3QgcmVzdWx0ID0gYXdhaXQgZmV0Y2goYCR7dXJsfSR7cXVlcnl9YCwge1xuICAgICAgICAgICAgY3JlZGVudGlhbHM6ICdpbmNsdWRlJyxcbiAgICAgICAgICAgIGhlYWRlcnM6IHtcbiAgICAgICAgICAgICAgJ0FjY2VwdC1MYW5ndWFnZSc6IGkxOG4ubGFuZ3VhZ2UsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0pXG5cbiAgICAgICAgICBpZiAocmVzdWx0Lm9rKSB7XG4gICAgICAgICAgICBjb25zdCBqc29uID0gYXdhaXQgcmVzdWx0Lmpzb24oKVxuICAgICAgICAgICAgaWYgKGpzb24uZG9jcykge1xuICAgICAgICAgICAgICBkaXNwYXRjaERvY3VtZW50cyh7XG4gICAgICAgICAgICAgICAgZG9jczoganNvbi5kb2NzLFxuICAgICAgICAgICAgICAgIGlkc1RvTG9hZCxcbiAgICAgICAgICAgICAgICByZWxhdGlvblRvOiBzbHVnLFxuICAgICAgICAgICAgICAgIHR5cGU6ICdBRERfTE9BREVEJyxcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgZGlzcGF0Y2hEb2N1bWVudHMoeyBkb2NzOiBbXSwgaWRzVG9Mb2FkLCByZWxhdGlvblRvOiBzbHVnLCB0eXBlOiAnQUREX0xPQURFRCcgfSlcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0pXG4gICAgfSxcbiAgICBbZGVib3VuY2VkRG9jdW1lbnRzLCBzZXJ2ZXJVUkwsIGFwaSwgaTE4biwgbG9jYWxlXSxcbiAgKVxuXG4gIHVzZUVmZmVjdCgoKSA9PiB7XG4gICAgbG9hZFJlbGF0aW9uc2hpcERvY3MobG9jYWxlICYmIHByZXZMb2NhbGUuY3VycmVudCAhPT0gbG9jYWxl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UVBLElBQUlKLE9BQU9LLEVBQUUsRUFBRTtvQkFDYixNQUFNQyxPQUFPLE1BQU1OLE9BQU9NLElBQUk7b0JBQzlCLElBQUlBLEtBQUtwQixJQUFJLEVBQUU7d0JBQ2J4QixrQkFBa0I7NEJBQ2hCd0IsTUFBTW9CLEtBQUtwQixJQUFJOzRCQUNmQzs0QkFDQW9CLFlBQVl0Qjs0QkFDWnVCLE1BQU07d0JBQ1I7b0JBQ0Y7Z0JBQ0YsT0FBTztvQkFDTDlDLGtCQUFrQjt3QkFBRXdCLE1BQU0sRUFBRTt3QkFBRUM7d0JBQVdvQixZQUFZdEI7d0JBQU11QixNQUFNO29CQUFhO2dCQUNoRjtZQUNGO1FBQ0Y7SUFDRixHQUNBO1FBQUMzQztRQUFvQmE7UUFBV0Q7UUFBS1I7UUFBTUc7S0FBTztJQUdwRHFDLElBQUFBLGdCQUFTLEVBQUM7UUFDUjlCLHFCQUFxQlAsVUFBVUUsV0FBV29DLE9BQU8sS0FBS3RDO1FBQ3RERSxXQUFXb0MsT0FBTyxHQUFHdEM7SUFDdkIsR0FBRztRQUFDQTtRQUFRTztLQUFxQjtJQUVqQyxNQUFNZ0MsbUJBQW1CL0IsSUFBQUEsa0JBQVcsRUFDbEMsT0FBT2dDO1FBQ0xsRCxrQkFBa0I7WUFBRXdCLE1BQU0wQjtZQUFlSixNQUFNO1FBQVU7SUFDM0QsR0FDQSxFQUFFO0lBR0oscUJBQU8sNkJBQUNsRCxRQUFRdUQsUUFBUTtRQUFDeEIsT0FBTztZQUFFNUI7WUFBV2tEO1FBQWlCO09BQUluRDtBQUNwRTtBQUVPLE1BQU1ILHVCQUF1QixJQUErQnlELElBQUFBLGlCQUFVLEVBQUN4RCJ9
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { TypeWithID } from 'payload/types';
|
|
2
|
+
import type { Documents } from './index';
|
|
3
|
+
type RequestDocuments = {
|
|
4
|
+
docs: {
|
|
5
|
+
relationTo: string;
|
|
6
|
+
value: number | string;
|
|
7
|
+
}[];
|
|
8
|
+
type: 'REQUEST';
|
|
9
|
+
};
|
|
10
|
+
type AddLoadedDocuments = {
|
|
11
|
+
docs: TypeWithID[];
|
|
12
|
+
idsToLoad: (number | string)[];
|
|
13
|
+
relationTo: string;
|
|
14
|
+
type: 'ADD_LOADED';
|
|
15
|
+
};
|
|
16
|
+
type Action = AddLoadedDocuments | RequestDocuments;
|
|
17
|
+
export declare function reducer(state: Documents, action: Action): Documents;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=reducer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../../../src/pages/List/Default/RelationshipProvider/reducer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAE/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAExC,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,EAAE,CAAA;IACtD,IAAI,EAAE,SAAS,CAAA;CAChB,CAAA;AAED,KAAK,kBAAkB,GAAG;IACxB,IAAI,EAAE,UAAU,EAAE,CAAA;IAClB,SAAS,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAA;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,YAAY,CAAA;CACnB,CAAA;AAED,KAAK,MAAM,GAAG,kBAAkB,GAAG,gBAAgB,CAAA;AAEnD,wBAAgB,OAAO,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,CAwCnE"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "reducer", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return reducer;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
function reducer(state, action) {
|
|
12
|
+
switch(action.type){
|
|
13
|
+
case 'REQUEST':
|
|
14
|
+
{
|
|
15
|
+
const newState = {
|
|
16
|
+
...state
|
|
17
|
+
};
|
|
18
|
+
action.docs.forEach(({ relationTo, value })=>{
|
|
19
|
+
if (typeof newState[relationTo] !== 'object') {
|
|
20
|
+
newState[relationTo] = {};
|
|
21
|
+
}
|
|
22
|
+
newState[relationTo][value] = null;
|
|
23
|
+
});
|
|
24
|
+
return newState;
|
|
25
|
+
}
|
|
26
|
+
case 'ADD_LOADED':
|
|
27
|
+
{
|
|
28
|
+
const newState = {
|
|
29
|
+
...state
|
|
30
|
+
};
|
|
31
|
+
if (typeof newState[action.relationTo] !== 'object') {
|
|
32
|
+
newState[action.relationTo] = {};
|
|
33
|
+
}
|
|
34
|
+
const unreturnedIDs = [
|
|
35
|
+
...action.idsToLoad
|
|
36
|
+
];
|
|
37
|
+
if (Array.isArray(action.docs)) {
|
|
38
|
+
action.docs.forEach((doc)=>{
|
|
39
|
+
unreturnedIDs.splice(unreturnedIDs.indexOf(doc.id), 1);
|
|
40
|
+
newState[action.relationTo][doc.id] = doc;
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
unreturnedIDs.forEach((id)=>{
|
|
44
|
+
newState[action.relationTo][id] = false;
|
|
45
|
+
});
|
|
46
|
+
return newState;
|
|
47
|
+
}
|
|
48
|
+
default:
|
|
49
|
+
{
|
|
50
|
+
return state;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9wYWdlcy9MaXN0L0RlZmF1bHQvUmVsYXRpb25zaGl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BR0g7b0JBQ3hDO2dCQUNGO2dCQUVBSixjQUFjSCxPQUFPLENBQUMsQ0FBQ1U7b0JBQ3JCWixRQUFRLENBQUNGLE9BQU9LLFVBQVUsQ0FBQyxDQUFDUyxHQUFHLEdBQUc7Z0JBQ3BDO2dCQUVBLE9BQU9aO1lBQ1Q7UUFFQTtZQUFTO2dCQUNQLE9BQU9IO1lBQ1Q7SUFDRjtBQUNGIn0=
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/pages/List/Default/index.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAA8B,MAAM,OAAO,CAAA;AAOlD,OAAO,cAAc,CAAA;AAIrB,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAsLnC,CAAA"}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "DefaultListView", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function() {
|
|
9
|
+
return DefaultListView;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
const _translations = require("@payloadcms/translations");
|
|
13
|
+
const _ui = require("@payloadcms/ui");
|
|
14
|
+
const _utilities = require("payload/utilities");
|
|
15
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
16
|
+
const _DeleteMany = /*#__PURE__*/ _interop_require_default(require("../../../../../ui/src/elements/DeleteMany"));
|
|
17
|
+
const _EditMany = require("../../../../../ui/src/elements/EditMany");
|
|
18
|
+
const _PublishMany = require("../../../../../ui/src/elements/PublishMany");
|
|
19
|
+
const _UnpublishMany = require("../../../../../ui/src/elements/UnpublishMany");
|
|
20
|
+
const _RelationshipProvider = require("./RelationshipProvider");
|
|
21
|
+
require("./index.scss");
|
|
22
|
+
function _interop_require_default(obj) {
|
|
23
|
+
return obj && obj.__esModule ? obj : {
|
|
24
|
+
default: obj
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
28
|
+
if (typeof WeakMap !== "function") return null;
|
|
29
|
+
var cacheBabelInterop = new WeakMap();
|
|
30
|
+
var cacheNodeInterop = new WeakMap();
|
|
31
|
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
32
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
33
|
+
})(nodeInterop);
|
|
34
|
+
}
|
|
35
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
36
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
37
|
+
return obj;
|
|
38
|
+
}
|
|
39
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
40
|
+
return {
|
|
41
|
+
default: obj
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
45
|
+
if (cache && cache.has(obj)) {
|
|
46
|
+
return cache.get(obj);
|
|
47
|
+
}
|
|
48
|
+
var newObj = {
|
|
49
|
+
__proto__: null
|
|
50
|
+
};
|
|
51
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
52
|
+
for(var key in obj){
|
|
53
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
54
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
55
|
+
if (desc && (desc.get || desc.set)) {
|
|
56
|
+
Object.defineProperty(newObj, key, desc);
|
|
57
|
+
} else {
|
|
58
|
+
newObj[key] = obj[key];
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
newObj.default = obj;
|
|
63
|
+
if (cache) {
|
|
64
|
+
cache.set(obj, newObj);
|
|
65
|
+
}
|
|
66
|
+
return newObj;
|
|
67
|
+
}
|
|
68
|
+
const baseClass = 'collection-list';
|
|
69
|
+
const DefaultListView = ()=>{
|
|
70
|
+
const { Header, collectionSlug, data, handlePageChange, handlePerPageChange, handleSearchChange, handleSortChange, handleWhereChange, hasCreatePermission, limit, modifySearchParams, newDocumentURL, titleField } = (0, _ui.useListInfo)();
|
|
71
|
+
const config = (0, _ui.useConfig)();
|
|
72
|
+
const { componentMap } = (0, _ui.useComponentMap)();
|
|
73
|
+
const collectionComponentMap = componentMap.collections[collectionSlug];
|
|
74
|
+
const { AfterList, AfterListTable, BeforeList, BeforeListTable } = collectionComponentMap || {};
|
|
75
|
+
const collectionConfig = config.collections.find((collection)=>collection.slug === collectionSlug);
|
|
76
|
+
const { labels } = collectionConfig;
|
|
77
|
+
const { i18n } = (0, _ui.useTranslation)();
|
|
78
|
+
const { setStepNav } = (0, _ui.useStepNav)();
|
|
79
|
+
const { breakpoints: { s: smallBreak } } = (0, _ui.useWindowInfo)();
|
|
80
|
+
let docs = data.docs || [];
|
|
81
|
+
if (collectionConfig.upload) {
|
|
82
|
+
docs = docs?.map((doc)=>{
|
|
83
|
+
return {
|
|
84
|
+
...doc,
|
|
85
|
+
filesize: (0, _utilities.formatFilesize)(doc.filesize)
|
|
86
|
+
};
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
(0, _react.useEffect)(()=>{
|
|
90
|
+
setStepNav([
|
|
91
|
+
{
|
|
92
|
+
label: labels?.plural
|
|
93
|
+
}
|
|
94
|
+
]);
|
|
95
|
+
}, [
|
|
96
|
+
setStepNav,
|
|
97
|
+
labels
|
|
98
|
+
]);
|
|
99
|
+
return /*#__PURE__*/ _react.default.createElement("div", {
|
|
100
|
+
className: baseClass
|
|
101
|
+
}, BeforeList, /*#__PURE__*/ _react.default.createElement(_ui.SelectionProvider, {
|
|
102
|
+
docs: data.docs,
|
|
103
|
+
totalDocs: data.totalDocs
|
|
104
|
+
}, /*#__PURE__*/ _react.default.createElement(_ui.Gutter, {
|
|
105
|
+
className: `${baseClass}__wrap`
|
|
106
|
+
}, /*#__PURE__*/ _react.default.createElement("header", {
|
|
107
|
+
className: `${baseClass}__header`
|
|
108
|
+
}, Header || /*#__PURE__*/ _react.default.createElement(_react.Fragment, null, /*#__PURE__*/ _react.default.createElement("h1", null, (0, _translations.getTranslation)(labels?.plural, i18n)), hasCreatePermission && /*#__PURE__*/ _react.default.createElement(_ui.Pill, {
|
|
109
|
+
"aria-label": i18n.t('general:createNewLabel', {
|
|
110
|
+
label: (0, _translations.getTranslation)(labels?.singular, i18n)
|
|
111
|
+
}),
|
|
112
|
+
to: newDocumentURL
|
|
113
|
+
}, i18n.t('general:createNew')), !smallBreak && /*#__PURE__*/ _react.default.createElement(_ui.ListSelection, {
|
|
114
|
+
label: (0, _translations.getTranslation)(collectionConfig.labels.plural, i18n)
|
|
115
|
+
}))), /*#__PURE__*/ _react.default.createElement(_ui.ListControls, {
|
|
116
|
+
collectionConfig: collectionConfig,
|
|
117
|
+
// textFieldsToBeSearched={textFieldsToBeSearched}
|
|
118
|
+
// handleSearchChange={handleSearchChange}
|
|
119
|
+
// handleSortChange={handleSortChange}
|
|
120
|
+
// handleWhereChange={handleWhereChange}
|
|
121
|
+
// modifySearchQuery={modifySearchParams}
|
|
122
|
+
titleField: titleField
|
|
123
|
+
}), BeforeListTable, !data.docs && /*#__PURE__*/ _react.default.createElement(_ui.StaggeredShimmers, {
|
|
124
|
+
className: [
|
|
125
|
+
`${baseClass}__shimmer`,
|
|
126
|
+
`${baseClass}__shimmer--rows`
|
|
127
|
+
].join(' '),
|
|
128
|
+
count: 6
|
|
129
|
+
}), data.docs && data.docs.length > 0 && /*#__PURE__*/ _react.default.createElement(_RelationshipProvider.RelationshipProvider, null, /*#__PURE__*/ _react.default.createElement(_ui.Table, {
|
|
130
|
+
customCellContext: {
|
|
131
|
+
collectionSlug,
|
|
132
|
+
uploadConfig: collectionConfig.upload
|
|
133
|
+
},
|
|
134
|
+
data: docs
|
|
135
|
+
})), data.docs && data.docs.length === 0 && /*#__PURE__*/ _react.default.createElement("div", {
|
|
136
|
+
className: `${baseClass}__no-results`
|
|
137
|
+
}, /*#__PURE__*/ _react.default.createElement("p", null, i18n.t('general:noResults', {
|
|
138
|
+
label: (0, _translations.getTranslation)(labels?.plural, i18n)
|
|
139
|
+
})), hasCreatePermission && newDocumentURL && /*#__PURE__*/ _react.default.createElement(_ui.Button, {
|
|
140
|
+
el: "link",
|
|
141
|
+
to: newDocumentURL
|
|
142
|
+
}, i18n.t('general:createNewLabel', {
|
|
143
|
+
label: (0, _translations.getTranslation)(labels?.singular, i18n)
|
|
144
|
+
}))), AfterListTable, data.docs && data.docs.length > 0 && /*#__PURE__*/ _react.default.createElement("div", {
|
|
145
|
+
className: `${baseClass}__page-controls`
|
|
146
|
+
}, /*#__PURE__*/ _react.default.createElement(_ui.Pagination, {
|
|
147
|
+
disableHistoryChange: modifySearchParams === false,
|
|
148
|
+
hasNextPage: data.hasNextPage,
|
|
149
|
+
hasPrevPage: data.hasPrevPage,
|
|
150
|
+
limit: data.limit,
|
|
151
|
+
nextPage: data.nextPage,
|
|
152
|
+
numberOfNeighbors: 1,
|
|
153
|
+
onChange: handlePageChange,
|
|
154
|
+
page: data.page,
|
|
155
|
+
prevPage: data.prevPage,
|
|
156
|
+
totalPages: data.totalPages
|
|
157
|
+
}), data?.totalDocs > 0 && /*#__PURE__*/ _react.default.createElement(_react.Fragment, null, /*#__PURE__*/ _react.default.createElement("div", {
|
|
158
|
+
className: `${baseClass}__page-info`
|
|
159
|
+
}, data.page * data.limit - (data.limit - 1), "-", data.totalPages > 1 && data.totalPages !== data.page ? data.limit * data.page : data.totalDocs, ' ', i18n.t('general:of'), " ", data.totalDocs), /*#__PURE__*/ _react.default.createElement(_ui.PerPage, {
|
|
160
|
+
handleChange: handlePerPageChange,
|
|
161
|
+
limit: limit,
|
|
162
|
+
limits: collectionConfig?.admin?.pagination?.limits,
|
|
163
|
+
modifySearchParams: modifySearchParams,
|
|
164
|
+
resetPage: data.totalDocs <= data.pagingCounter
|
|
165
|
+
}), smallBreak && /*#__PURE__*/ _react.default.createElement("div", {
|
|
166
|
+
className: `${baseClass}__list-selection`
|
|
167
|
+
}, /*#__PURE__*/ _react.default.createElement(_react.Fragment, null, /*#__PURE__*/ _react.default.createElement(_ui.ListSelection, {
|
|
168
|
+
label: (0, _translations.getTranslation)(collectionConfig.labels.plural, i18n)
|
|
169
|
+
}), /*#__PURE__*/ _react.default.createElement("div", {
|
|
170
|
+
className: `${baseClass}__list-selection-actions`
|
|
171
|
+
}, /*#__PURE__*/ _react.default.createElement(_EditMany.EditMany, {
|
|
172
|
+
collection: collectionConfig
|
|
173
|
+
}), /*#__PURE__*/ _react.default.createElement(_PublishMany.PublishMany, {
|
|
174
|
+
collection: collectionConfig
|
|
175
|
+
}), /*#__PURE__*/ _react.default.createElement(_UnpublishMany.UnpublishMany, {
|
|
176
|
+
collection: collectionConfig
|
|
177
|
+
}), /*#__PURE__*/ _react.default.createElement(_DeleteMany.default, {
|
|
178
|
+
collection: collectionConfig
|
|
179
|
+
})))))))), AfterList);
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9wYWdlcy9MaXN0L0RlZmF1bHQvaW5kZXgudHN4Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2UgY2xpZW50J1xuaW1wb3J0IHsgZ2V0VHJhbnNsYXRpb24gfSBmcm9tICdAcGF5bG9hZGNtcy90cmFuc2xhdGlvbnMnXG5pbXBvcnQge1xuICBCdXR0b24sXG4gIEd1dHRlcixcbiAgTGlzdENvbnRyb2xzLFxuICBMaXN0U2VsZWN0aW9uLFxuICBQYWdpbmF0aW9uLFxuICBQZXJQYWdlLFxuICBQaWxsLFxuICBTZWxlY3Rpb25Qcm92aWRlcixcbiAgU3RhZ2dlcmVkU2hpbW1lcnMsXG4gIFRhYmxlLFxuICB1c2VDb21wb25lbnRNYXAsXG4g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csIHtcbiAgICAgICAgICAgICAgICAgICAgICBsYWJlbDogZ2V0VHJhbnNsYXRpb24obGFiZWxzPy5zaW5ndWxhciwgaTE4biksXG4gICAgICAgICAgICAgICAgICAgIH0pfVxuICAgICAgICAgICAgICAgICAgICB0bz17bmV3RG9jdW1lbnRVUkx9XG4gICAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgIHtpMThuLnQoJ2dlbmVyYWw6Y3JlYXRlTmV3Jyl9XG4gICAgICAgICAgICAgICAgICA8L1BpbGw+XG4gICAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgICAgICB7IXNtYWxsQnJlYWsgJiYgKFxuICAgICAgICAgICAgICAgICAgPExpc3RTZWxlY3Rpb24gbGFiZWw9e2dldFRyYW5zbGF0aW9uKGNvbGxlY3Rpb25Db25maWcubGFiZWxzLnBsdXJhbCwgaTE4bil9IC8+XG4gICAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgICAgICB7Lyoge2Rlc2NyaXB0aW9uICYmIChcbiAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPXtgJHtiYXNlQ2xhc3N9X19zdWItaGVhZGVyYH0+XG4gICAgICAgICAgICAgICAgICAgIDxWaWV3RGVzY3JpcHRpb24gZGVzY3JpcHRpb249e2Rlc2NyaXB0aW9ufSAvPlxuICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgKX0gKi99XG4gICAgICAgICAgICAgIDwvRnJhZ21lbnQ+XG4gICAgICAgICAgICApfVxuICAgICAgICAgIDwvaGVhZGVyPlxuICAgICAgICAgIDxMaXN0Q29udHJvbHNcbiAgICAgICAgICAgIGNvbGxlY3Rpb25Db25maWc9e2NvbGxlY3Rpb25Db25maWd9XG4gICAgICAgICAgICAvLyB0ZXh0RmllbGRzVG9CZVNlYXJjaGVkPXt0ZXh0RmllbGRzVG9CZVNlYXJjaGVkfVxuICAgICAgICAgICAgLy8gaGFuZGxlU2VhcmNoQ2hhbmdlPXtoYW5kbGVTZWFyY2hDaGFuZ2V9XG4gICAgICAgICAgICAvLyBoYW5kbGVTb3J0Q2hhbmdlPXtoYW5kbGVTb3J0Q2hhbmdlfVxuICAgICAgICAgICAgLy8gaGFuZGxlV2hlcmVDaGFuZ2U9e2hhbmRsZVdoZXJlQ2hhbmdlfVxuICAgICAgICAgICAgLy8gbW9kaWZ5U2VhcmNoUXVlcnk9e21vZGlmeVNlYXJjaFBhcmFtc31cbiAgICAgICAgICAgIHRpdGxlRmllbGQ9e3RpdGxlRmllbGR9XG4gICAgICAgICAgLz5cbiAgICAgICAgICB7QmVmb3JlTGlzdFRhYmxlfVxuICAgICAgICAgIHshZGF0YS5kb2NzICYmIChcbiAgICAgICAgICAgIDxTdGFnZ2VyZWRTaGltbWVyc1xuICAgICAgICAgICAgICBjbGFzc05hbWU9e1tgJHtiYXNlQ2xhc3N9X19zaGltbWVyYCwgYCR7YmFzZUNsYXNzfV9fc2hpbW1lci0tcm93c2BdLmpvaW4oJyAnKX1cbiAgICAgICAgICAgICAgY291bnQ9ezZ9XG4gICAgICAgICAgICAvPlxuICAgICAgICAgICl9XG4gICAgICAgICAge2RhdGEuZG9jcyAmJiBkYXRhLmRvY3MubGVuZ3RoID4gMCAmJiAoXG4gICAgICAgICAgICA8UmVsYXRpb25zaGlwUHJvdmlkZXI+XG4gICAgICAgICAgICAgIDxUYWJsZVxuICAgICAgICAgICAgICAgIGN1c3RvbUNlbGxDb250ZXh0PXt7XG4gICAgICAgICAgICAgICAgICBjb2xsZWN0aW9uU2x1ZyxcbiAgICAgICAgICAgICAgICAgIHVwbG9hZENvbmZpZzogY29sbGVjdGlvbkNvbmZpZy51cGxvYWQsXG4gICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICBkYXRhPXtkb2NzfVxuICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgPC9SZWxhdGlvbnNoaXBQcm92aWRlcj5cbiAgICAgICAgICApfVxuICAgICAgICAgIHtkYXRhLmRvY3MgJiYgZGF0YS5kb2NzLmxlbmd0aCA9PT0gMCAmJiAoXG4gICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT17YCR7YmFzZUNsYXNzfV9fbm8tcmVzdWx0c2B9PlxuICAgICAgICAgICAgICA8cD57aTE4bi50KCdnZW5lcmFsOm5vUmVzdWx0cycsIHsgbGFiZWw6IGdldFRyYW5zbGF0aW9uKGxhYmVscz8ucGx1cmFsLCBpMThuKSB9KX08L3A+XG4gICAgICAgICAgICAgIHtoYXNDcmVhdGVQZXJtaXNzaW9uICYmIG5ld0RvY3VtZW50VVJMICYmIChcbiAgICAgICAgICAgICAgICA8QnV0dG9uIGVsPVwibGlua1wiIHRvPXtuZXdEb2N1bWVudFVSTH0+XG4gICAgICAgICAgICAgICAgICB7aTE4bi50KCdnZW5lcmFsOmNyZWF0ZU5ld0xhYmVsJywge1xuICAgICAgICAgICAgICAgICAgICBsYWJlbDogZ2V0VHJhbnNsYXRpb24obGFiZWxzPy5zaW5ndWxhciwgaTE4biksXG4gICAgICAgICAgICAgICAgICB9KX1cbiAgICAgICAgICAgICAgICA8L0J1dHRvbj5cbiAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICl9XG4gICAgICAgICAge0FmdGVyTGlzdFRhYmxlfVxuICAgICAgICAgIHtkYXRhLmRvY3MgJiYgZGF0YS5kb2NzLmxlbmd0aCA+IDAgJiYgKFxuICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9e2Ake2Jhc2VDbGFzc31fX3BhZ2UtY29udHJvbHNgfT5cbiAgICAgICAgICAgICAgPFBhZ2luYXRpb25cbiAgICAgICAgICAgICAgICBkaXNhYmxlSGlzdG9yeUNoYW5nZT17bW9kaWZ5U2VhcmNoUGFyYW1zID09PSBmYWxzZX1cbiAgICAgICAgICAgICAgICBoYXNOZXh0UGFnZT17ZGF0YS5oYXNOZXh0UGFnZX1cbiAgICAgICAgICAgICAgICBoYXNQcmV2UGFnZT17ZGF0YS5oYXNQcmV2UGFnZX1cbiAgICAgICAgICAgICAgICBsaW1pdD17ZGF0YS5saW1pdH1cbiAgICAgICAgICAgICAgICBuZXh0UGFnZT17ZGF0YS5uZXh0UGFnZX1cbiAgICAgICAgICAgICAgICBudW1iZXJPZk5laWdoYm9ycz17MX1cbiAgICAgICAgICAgICAgICBvbkNoYW5nZT17aGFuZGxlUGFnZUNoYW5nZX1cbiAgICAgICAgICAgICAgICBwYWdlPXtkYXRhLnBhZ2V9XG4gICAgICAgICAgICAgICAgcHJldlBhZ2U9e2RhdGEucHJldlBhZ2V9XG4gICAgICAgICAgICAgICAgdG90YWxQYWdlcz17ZGF0YS50b3RhbFBhZ2VzfVxuICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICB7ZGF0YT8udG90YWxEb2NzID4gMCAmJiAoXG4gICAgICAgICAgICAgICAgPEZyYWdtZW50PlxuICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9e2Ake2Jhc2VDbGFzc31fX3BhZ2UtaW5mb2B9PlxuICAgICAgICAgICAgICAgICAgICB7ZGF0YS5wYWdlICogZGF0YS5saW1pdCAtIChkYXRhLmxpbWl0IC0gMSl9LVxuICAgICAgICAgICAgICAgICAgICB7ZGF0YS50b3RhbFBhZ2VzID4gMSAmJiBkYXRhLnRvdGFsUGFnZXMgIT09IGRhdGEucGFnZVxuICAgICAgICAgICAgICAgICAgICAgID8gZGF0YS5saW1pdCAqIGRhdGEucGFnZVxuICAgICAgICAgICAgICAgICAgICAgIDogZGF0YS50b3RhbERvY3N9eycgJ31cbiAgICAgICAgICAgICAgICAgICAge2kxOG4udCgnZ2VuZXJhbDpvZicpfSB7ZGF0YS50b3RhbERvY3N9XG4gICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgIDxQZXJQYWdlXG4gICAgICAgICAgICAgICAgICAgIGhhbmRsZUNoYW5nZT17aGFuZGxlUGVyUGFnZUNoYW5nZX1cbiAgICAgICAgICAgICAgICAgICAgbGltaXQ9e2xpbWl0fVxuICAgICAgICAgICAgICAgICAgICBsaW1pdHM9e2NvbGxlY3Rpb25Db25maWc/LmFkbWluPy5wYWdpbmF0aW9uPy5saW1pdHN9XG4gICAgICAgICAgICAgICAgICAgIG1vZGlmeVNlYXJjaFBhcmFtcz17bW9kaWZ5U2VhcmNoUGFyYW1zfVxuICAgICAgICAgICAgICAgICAgICByZXNldFBhZ2U9e2RhdGEudG90YWxEb2NzIDw9IGRhdGEucGFnaW5nQ291bnRlcn1cbiAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgICB7c21hbGxCcmVhayAmJiAoXG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPXtgJHtiYXNlQ2xhc3N9X19saXN0LXNlbGVjdGlvbmB9PlxuICAgICAgICAgICAgICAgICAgICAgIDxGcmFnbWVudD5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxMaXN0U2VsZWN0aW9uXG4gICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsPXtnZXRUcmFuc2xhdGlvbihjb2xsZWN0aW9uQ29uZmlnLmxhYmVscy5wbHVyYWwsIGkxOG4pfVxuICAgICAgICAgICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPXtgJHtiYXNlQ2xhc3N9X19saXN0LXNlbGVjdGlvbi1hY3Rpb25zYH0+XG4gICAgICAgICAgICAgICAgICAgICAgICAgIDxFZGl0TWFueSBjb2xsZWN0aW9uPXtjb2xsZWN0aW9uQ29uZmlnfSAvPlxuICAgICAgICAgICAgICAgICAgICAgICAgICA8UHVibGlzaE1hbnkgY29sbGVjdGlvbj17Y29sbGVjdGlvbkNvbmZpZ30gLz5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgPFVucHVibGlzaE1hbnkgY29sbGVjdGlvbj17Y29sbGVjdGlvbkNvbmZpZ30gLz5cbiAgICAgICAgICAgICAgICA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MsS0FBRXZELEtBQUsrQyxTQUFTLGlCQUV4Qyw2QkFBQ2tDLFdBQU87UUFDTkMsY0FBY2hGO1FBQ2RLLE9BQU9BO1FBQ1A0RSxRQUFRN0Qsa0JBQWtCOEQsT0FBT0MsWUFBWUY7UUFDN0MzRSxvQkFBb0JBO1FBQ3BCOEUsV0FBV3RGLEtBQUsrQyxTQUFTLElBQUkvQyxLQUFLdUYsYUFBYTtRQUVoRHRELDRCQUNDLDZCQUFDVztRQUFJQyxXQUFXLENBQUMsRUFBRWhELFVBQVUsZ0JBQWdCLENBQUM7cUJBQzVDLDZCQUFDcUQsZUFBUSxzQkFDUCw2QkFBQ1EsaUJBQWE7UUFDWmhCLE9BQU9VLElBQUFBLDRCQUFjLEVBQUM5QixpQkFBaUJJLE1BQU0sQ0FBQ2lCLE1BQU0sRUFBRWhCO3NCQUV4RCw2QkFBQ2lCO1FBQUlDLFdBQVcsQ0FBQyxFQUFFaEQsVUFBVSx3QkFBd0IsQ0FBQztxQkFDcEQsNkJBQUMyRixrQkFBUTtRQUFDaEUsWUFBWUY7c0JBQ3RCLDZCQUFDbUUsd0JBQVc7UUFBQ2pFLFlBQVlGO3NCQUN6Qiw2QkFBQ29FLDRCQUFhO1FBQUNsRSxZQUFZRjtzQkFDM0IsNkJBQUNxRSxtQkFBVTtRQUFDbkUsWUFBWUY7ZUFXM0NKO0FBR1AifQ==
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
@import '../../../scss/styles.scss';
|
|
2
|
+
|
|
3
|
+
.collection-list {
|
|
4
|
+
width: 100%;
|
|
5
|
+
margin-top: base(0.5);
|
|
6
|
+
|
|
7
|
+
&__wrap {
|
|
8
|
+
padding-bottom: var(--spacing-view-bottom);
|
|
9
|
+
|
|
10
|
+
& > *:not(:last-child) {
|
|
11
|
+
margin-bottom: var(--base);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&__header {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: flex-end;
|
|
18
|
+
flex-wrap: wrap;
|
|
19
|
+
gap: base(0.75);
|
|
20
|
+
|
|
21
|
+
h1 {
|
|
22
|
+
margin: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
a {
|
|
26
|
+
text-decoration: none;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.pill {
|
|
30
|
+
position: relative;
|
|
31
|
+
top: -14px;
|
|
32
|
+
margin: 0;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&__sub-header {
|
|
37
|
+
flex-basis: 100%;
|
|
38
|
+
margin-top: base(0.25);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.table {
|
|
42
|
+
table {
|
|
43
|
+
width: 100%;
|
|
44
|
+
overflow: auto;
|
|
45
|
+
|
|
46
|
+
[class^='cell'] > p,
|
|
47
|
+
[class^='cell'] > span,
|
|
48
|
+
[class^='cell'] > a {
|
|
49
|
+
line-clamp: 4;
|
|
50
|
+
-webkit-box-orient: vertical;
|
|
51
|
+
-webkit-line-clamp: 4;
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
display: -webkit-box;
|
|
54
|
+
max-width: 100vw;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
#heading-_select,
|
|
58
|
+
.cell-_select {
|
|
59
|
+
min-width: unset;
|
|
60
|
+
width: auto;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&__no-results {
|
|
66
|
+
display: flex;
|
|
67
|
+
flex-direction: column;
|
|
68
|
+
align-items: flex-start;
|
|
69
|
+
gap: var(--base);
|
|
70
|
+
|
|
71
|
+
& > * {
|
|
72
|
+
margin: 0;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&__page-controls {
|
|
77
|
+
width: 100%;
|
|
78
|
+
display: flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.paginator {
|
|
83
|
+
margin-bottom: 0;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&__page-info {
|
|
87
|
+
[dir='ltr'] & {
|
|
88
|
+
margin-right: base(1);
|
|
89
|
+
margin-left: auto;
|
|
90
|
+
}
|
|
91
|
+
[dir='rtl'] & {
|
|
92
|
+
margin-left: base(1);
|
|
93
|
+
margin-right: auto;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&__list-selection {
|
|
98
|
+
position: fixed;
|
|
99
|
+
bottom: 0;
|
|
100
|
+
z-index: 10;
|
|
101
|
+
padding: base(0.75) 0;
|
|
102
|
+
width: 100%;
|
|
103
|
+
background-color: var(--theme-bg);
|
|
104
|
+
|
|
105
|
+
.btn {
|
|
106
|
+
margin: 0 0 0 base(0.5);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.btn {
|
|
110
|
+
background-color: var(--theme-elevation-100);
|
|
111
|
+
cursor: pointer;
|
|
112
|
+
padding: 0 base(0.25);
|
|
113
|
+
border-radius: $style-radius-s;
|
|
114
|
+
|
|
115
|
+
&:hover {
|
|
116
|
+
background-color: var(--theme-elevation-200);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&__list-selection-actions {
|
|
122
|
+
display: flex;
|
|
123
|
+
gap: base(0.25);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&__shimmer {
|
|
127
|
+
margin-top: base(1.75);
|
|
128
|
+
width: 100%;
|
|
129
|
+
> div {
|
|
130
|
+
margin-top: 8px;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@include mid-break {
|
|
135
|
+
margin-top: base(0.25);
|
|
136
|
+
|
|
137
|
+
&__wrap {
|
|
138
|
+
padding-top: 0;
|
|
139
|
+
padding-bottom: 0;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&__header {
|
|
143
|
+
gap: base(0.5);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
&__sub-header {
|
|
147
|
+
margin-top: 0;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
&__search-input {
|
|
151
|
+
margin: 0;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// on mobile, extend the table all the way to the viewport edges
|
|
155
|
+
// this is to visually indicate overflowing content
|
|
156
|
+
.table {
|
|
157
|
+
display: flex;
|
|
158
|
+
width: calc(100% + calc(var(--gutter-h) * 2));
|
|
159
|
+
max-width: unset;
|
|
160
|
+
left: calc(var(--gutter-h) * -1);
|
|
161
|
+
position: relative;
|
|
162
|
+
padding-left: var(--gutter-h);
|
|
163
|
+
|
|
164
|
+
&::after {
|
|
165
|
+
content: '';
|
|
166
|
+
height: 1px;
|
|
167
|
+
padding-right: var(--gutter-h);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
&__page-controls {
|
|
172
|
+
flex-wrap: wrap;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
&__page-info {
|
|
176
|
+
margin-left: 0;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.paginator {
|
|
180
|
+
width: 100%;
|
|
181
|
+
margin-bottom: $baseline;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
@include small-break {
|
|
186
|
+
margin-top: 0;
|
|
187
|
+
margin-bottom: base(3);
|
|
188
|
+
|
|
189
|
+
&__header {
|
|
190
|
+
.pill {
|
|
191
|
+
top: -6px;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|