@payloadcms/next 3.0.0-alpha.3 → 3.0.0-alpha.30
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.js +5 -14
- package/dist/bin/install.js +16 -31
- package/dist/config.js +2 -12
- package/dist/elements/LeaveWithoutSaving/index.js +26 -76
- package/dist/elements/LeaveWithoutSaving/usePreventLeave.js +11 -29
- package/dist/exports/index.d.ts +1 -1
- package/dist/exports/index.d.ts.map +1 -1
- package/dist/exports/index.js +2 -12
- package/dist/graphql/registerSchema.js +0 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -3
- package/dist/layouts/Admin/index.js +9 -32
- package/dist/layouts/Root/index.d.ts +1 -1
- package/dist/layouts/Root/index.d.ts.map +1 -1
- package/dist/layouts/Root/index.js +36 -54
- package/dist/next-fileupload/fileFactory.d.ts +2 -2
- package/dist/next-fileupload/fileFactory.d.ts.map +1 -1
- package/dist/next-fileupload/fileFactory.js +9 -19
- package/dist/next-fileupload/handlers.d.ts +2 -2
- package/dist/next-fileupload/handlers.d.ts.map +1 -1
- package/dist/next-fileupload/handlers.js +25 -89
- package/dist/next-fileupload/index.d.ts +1 -1
- package/dist/next-fileupload/index.js +10 -25
- package/dist/next-fileupload/isEligibleRequest.js +2 -12
- package/dist/next-fileupload/processMultipart.d.ts +1 -1
- package/dist/next-fileupload/processMultipart.d.ts.map +1 -1
- package/dist/next-fileupload/processMultipart.js +33 -46
- package/dist/next-fileupload/processNested.js +4 -14
- package/dist/next-fileupload/uploadTimer.js +2 -12
- package/dist/next-fileupload/utilities.d.ts +1 -1
- package/dist/next-fileupload/utilities.d.ts.map +1 -1
- package/dist/next-fileupload/utilities.js +31 -76
- package/dist/next-stream-file/index.d.ts +4 -0
- package/dist/next-stream-file/index.d.ts.map +1 -1
- package/dist/next-stream-file/index.js +6 -21
- package/dist/routes/graphql/handler.d.ts.map +1 -1
- package/dist/routes/graphql/handler.js +19 -36
- package/dist/routes/graphql/index.d.ts +2 -2
- package/dist/routes/graphql/index.d.ts.map +1 -1
- package/dist/routes/graphql/index.js +3 -21
- package/dist/routes/graphql/playground.js +6 -16
- package/dist/routes/index.d.ts +3 -3
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/index.js +4 -37
- package/dist/routes/rest/RouteError.js +10 -25
- package/dist/routes/rest/[collection]/file/[filename]/route.d.ts.map +1 -1
- package/dist/routes/rest/[collection]/file/[filename]/route.js +33 -39
- package/dist/routes/rest/auth/access.d.ts +1 -1
- package/dist/routes/rest/auth/access.d.ts.map +1 -1
- package/dist/routes/rest/auth/access.js +6 -21
- package/dist/routes/rest/auth/forgotPassword.d.ts +1 -1
- package/dist/routes/rest/auth/forgotPassword.d.ts.map +1 -1
- package/dist/routes/rest/auth/forgotPassword.js +6 -21
- package/dist/routes/rest/auth/init.d.ts +1 -1
- package/dist/routes/rest/auth/init.d.ts.map +1 -1
- package/dist/routes/rest/auth/init.js +4 -14
- package/dist/routes/rest/auth/login.d.ts +1 -1
- package/dist/routes/rest/auth/login.d.ts.map +1 -1
- package/dist/routes/rest/auth/login.js +10 -25
- package/dist/routes/rest/auth/logout.d.ts +1 -1
- package/dist/routes/rest/auth/logout.d.ts.map +1 -1
- package/dist/routes/rest/auth/logout.js +9 -24
- package/dist/routes/rest/auth/me.d.ts +1 -1
- package/dist/routes/rest/auth/me.d.ts.map +1 -1
- package/dist/routes/rest/auth/me.js +8 -23
- package/dist/routes/rest/auth/refresh.d.ts +1 -1
- package/dist/routes/rest/auth/refresh.d.ts.map +1 -1
- package/dist/routes/rest/auth/refresh.js +11 -25
- package/dist/routes/rest/auth/registerFirstUser.d.ts +1 -1
- package/dist/routes/rest/auth/registerFirstUser.d.ts.map +1 -1
- package/dist/routes/rest/auth/registerFirstUser.js +8 -23
- package/dist/routes/rest/auth/resetPassword.d.ts +1 -1
- package/dist/routes/rest/auth/resetPassword.d.ts.map +1 -1
- package/dist/routes/rest/auth/resetPassword.js +8 -23
- package/dist/routes/rest/auth/unlock.d.ts +1 -1
- package/dist/routes/rest/auth/unlock.d.ts.map +1 -1
- package/dist/routes/rest/auth/unlock.js +6 -21
- package/dist/routes/rest/auth/verifyEmail.d.ts +1 -1
- package/dist/routes/rest/auth/verifyEmail.d.ts.map +1 -1
- package/dist/routes/rest/auth/verifyEmail.js +6 -21
- package/dist/routes/rest/buildFormState.js +11 -34
- package/dist/routes/rest/checkEndpoints.d.ts.map +1 -1
- package/dist/routes/rest/checkEndpoints.js +4 -19
- package/dist/routes/rest/collections/create.d.ts +1 -1
- package/dist/routes/rest/collections/create.d.ts.map +1 -1
- package/dist/routes/rest/collections/create.js +8 -23
- package/dist/routes/rest/collections/delete.d.ts +1 -1
- package/dist/routes/rest/collections/delete.d.ts.map +1 -1
- package/dist/routes/rest/collections/delete.js +14 -29
- package/dist/routes/rest/collections/deleteByID.d.ts +1 -1
- package/dist/routes/rest/collections/deleteByID.d.ts.map +1 -1
- package/dist/routes/rest/collections/deleteByID.js +9 -24
- package/dist/routes/rest/collections/docAccess.d.ts +1 -1
- package/dist/routes/rest/collections/docAccess.d.ts.map +1 -1
- package/dist/routes/rest/collections/docAccess.js +6 -21
- package/dist/routes/rest/collections/find.d.ts +1 -1
- package/dist/routes/rest/collections/find.d.ts.map +1 -1
- package/dist/routes/rest/collections/find.js +12 -27
- package/dist/routes/rest/collections/findByID.d.ts +1 -1
- package/dist/routes/rest/collections/findByID.d.ts.map +1 -1
- package/dist/routes/rest/collections/findByID.js +8 -23
- package/dist/routes/rest/collections/findVersionByID.d.ts +1 -1
- package/dist/routes/rest/collections/findVersionByID.d.ts.map +1 -1
- package/dist/routes/rest/collections/findVersionByID.js +8 -23
- package/dist/routes/rest/collections/findVersions.d.ts +1 -1
- package/dist/routes/rest/collections/findVersions.d.ts.map +1 -1
- package/dist/routes/rest/collections/findVersions.js +12 -27
- package/dist/routes/rest/collections/restoreVersion.d.ts +1 -1
- package/dist/routes/rest/collections/restoreVersion.d.ts.map +1 -1
- package/dist/routes/rest/collections/restoreVersion.js +8 -23
- package/dist/routes/rest/collections/update.d.ts +1 -1
- package/dist/routes/rest/collections/update.d.ts.map +1 -1
- package/dist/routes/rest/collections/update.js +14 -29
- package/dist/routes/rest/collections/updateByID.d.ts +1 -1
- package/dist/routes/rest/collections/updateByID.d.ts.map +1 -1
- package/dist/routes/rest/collections/updateByID.js +8 -23
- package/dist/routes/rest/globals/docAccess.d.ts +1 -1
- package/dist/routes/rest/globals/docAccess.d.ts.map +1 -1
- package/dist/routes/rest/globals/docAccess.js +6 -21
- package/dist/routes/rest/globals/findOne.d.ts +1 -1
- package/dist/routes/rest/globals/findOne.d.ts.map +1 -1
- package/dist/routes/rest/globals/findOne.js +8 -23
- package/dist/routes/rest/globals/findVersionByID.d.ts +1 -1
- package/dist/routes/rest/globals/findVersionByID.d.ts.map +1 -1
- package/dist/routes/rest/globals/findVersionByID.js +8 -23
- package/dist/routes/rest/globals/findVersions.d.ts +1 -1
- package/dist/routes/rest/globals/findVersions.d.ts.map +1 -1
- package/dist/routes/rest/globals/findVersions.js +12 -27
- package/dist/routes/rest/globals/restoreVersion.d.ts +1 -1
- package/dist/routes/rest/globals/restoreVersion.d.ts.map +1 -1
- package/dist/routes/rest/globals/restoreVersion.js +8 -23
- package/dist/routes/rest/globals/update.d.ts +1 -1
- package/dist/routes/rest/globals/update.d.ts.map +1 -1
- package/dist/routes/rest/globals/update.js +8 -23
- package/dist/routes/rest/index.d.ts.map +1 -1
- package/dist/routes/rest/index.js +91 -120
- package/dist/routes/rest/types.js +2 -5
- package/dist/utilities/auth.d.ts +3 -3
- package/dist/utilities/auth.d.ts.map +1 -1
- package/dist/utilities/auth.js +7 -21
- package/dist/utilities/createPayloadRequest.d.ts.map +1 -1
- package/dist/utilities/createPayloadRequest.js +26 -31
- package/dist/utilities/getDataAndFile.js +4 -14
- package/dist/utilities/getNextI18n.js +11 -21
- package/dist/utilities/getNextT.js +11 -21
- package/dist/utilities/getPayload.d.ts +4 -0
- package/dist/utilities/getPayload.d.ts.map +1 -0
- package/dist/utilities/getPayload.js +62 -0
- package/dist/utilities/getRequestLanguage.d.ts +1 -1
- package/dist/utilities/getRequestLanguage.d.ts.map +1 -1
- package/dist/utilities/getRequestLanguage.js +4 -14
- package/dist/utilities/getRequestLocales.js +2 -12
- package/dist/utilities/initPage.d.ts +6 -15
- package/dist/utilities/initPage.d.ts.map +1 -1
- package/dist/utilities/initPage.js +45 -45
- package/dist/utilities/meta.js +5 -15
- package/dist/utilities/timestamp.d.ts +2 -0
- package/dist/utilities/timestamp.d.ts.map +1 -0
- package/dist/utilities/timestamp.js +7 -0
- package/dist/{pages → views}/API/RenderJSON/index.d.ts.map +1 -1
- package/dist/views/API/RenderJSON/index.js +91 -0
- package/dist/views/API/index.client.d.ts +4 -0
- package/dist/views/API/index.client.d.ts.map +1 -0
- package/dist/views/API/index.client.js +178 -0
- package/dist/views/API/index.d.ts +4 -0
- package/dist/views/API/index.d.ts.map +1 -0
- package/dist/views/API/index.js +7 -0
- package/dist/{pages/LivePreview → views/API}/meta.d.ts +1 -1
- package/dist/views/API/meta.d.ts.map +1 -0
- package/dist/views/API/meta.js +11 -0
- package/dist/{pages → views}/Account/Settings/index.d.ts.map +1 -1
- package/dist/views/Account/Settings/index.js +30 -0
- package/dist/views/Account/ToggleTheme/index.d.ts.map +1 -0
- package/dist/views/Account/ToggleTheme/index.js +34 -0
- package/dist/views/Account/index.d.ts +5 -0
- package/dist/views/Account/index.d.ts.map +1 -0
- package/dist/views/Account/index.js +78 -0
- package/dist/views/Account/meta.d.ts +3 -0
- package/dist/views/Account/meta.d.ts.map +1 -0
- package/dist/views/Account/meta.js +11 -0
- package/dist/views/CreateFirstUser/index.client.d.ts +7 -0
- package/dist/views/CreateFirstUser/index.client.d.ts.map +1 -0
- package/dist/views/CreateFirstUser/index.client.js +18 -0
- package/dist/views/CreateFirstUser/index.d.ts +6 -0
- package/dist/views/CreateFirstUser/index.d.ts.map +1 -0
- package/dist/views/CreateFirstUser/index.js +51 -0
- package/dist/views/CreateFirstUser/meta.d.ts +3 -0
- package/dist/views/CreateFirstUser/meta.d.ts.map +1 -0
- package/dist/views/CreateFirstUser/meta.js +11 -0
- package/dist/{pages → views}/Dashboard/Default/index.client.d.ts +2 -0
- package/dist/views/Dashboard/Default/index.client.d.ts.map +1 -0
- package/dist/views/Dashboard/Default/index.client.js +99 -0
- package/dist/{pages → views}/Dashboard/Default/index.d.ts +2 -0
- package/dist/views/Dashboard/Default/index.d.ts.map +1 -0
- package/dist/views/Dashboard/Default/index.js +28 -0
- package/dist/views/Dashboard/index.d.ts +5 -0
- package/dist/views/Dashboard/index.d.ts.map +1 -0
- package/dist/views/Dashboard/index.js +46 -0
- package/dist/views/Dashboard/meta.d.ts +3 -0
- package/dist/views/Dashboard/meta.d.ts.map +1 -0
- package/dist/views/Dashboard/meta.js +11 -0
- package/dist/{pages → views}/Document/getCustomViewByKey.d.ts +2 -2
- package/dist/views/Document/getCustomViewByKey.d.ts.map +1 -0
- package/dist/views/Document/getCustomViewByKey.js +5 -0
- package/dist/{pages → views}/Document/getCustomViewByPath.d.ts +2 -2
- package/dist/views/Document/getCustomViewByPath.d.ts.map +1 -0
- package/dist/views/Document/getCustomViewByPath.js +16 -0
- package/dist/views/Document/getMetaBySegment.d.ts +10 -0
- package/dist/views/Document/getMetaBySegment.d.ts.map +1 -0
- package/dist/views/Document/getMetaBySegment.js +77 -0
- package/dist/{pages → views}/Document/getViewsFromConfig.d.ts +3 -3
- package/dist/views/Document/getViewsFromConfig.d.ts.map +1 -0
- package/dist/views/Document/getViewsFromConfig.js +155 -0
- package/dist/views/Document/index.d.ts +6 -0
- package/dist/views/Document/index.d.ts.map +1 -0
- package/dist/views/Document/index.js +158 -0
- package/dist/views/Document/meta.d.ts +3 -0
- package/dist/views/Document/meta.d.ts.map +1 -0
- package/dist/views/Document/meta.js +4 -0
- package/dist/{pages → views}/Edit/Default/Auth/APIKey.d.ts.map +1 -1
- package/dist/views/Edit/Default/Auth/APIKey.js +89 -0
- package/dist/{pages → views}/Edit/Default/Auth/index.d.ts +1 -1
- package/dist/{pages → views}/Edit/Default/Auth/index.d.ts.map +1 -1
- package/dist/views/Edit/Default/Auth/index.js +124 -0
- package/dist/{pages → views}/Edit/Default/Auth/types.d.ts.map +1 -1
- package/dist/views/Edit/Default/Auth/types.js +3 -0
- package/dist/views/Edit/Default/SetDocumentTitle/formatTitle.d.ts +10 -0
- package/dist/views/Edit/Default/SetDocumentTitle/formatTitle.d.ts.map +1 -0
- package/dist/views/Edit/Default/SetDocumentTitle/formatTitle.js +20 -0
- package/dist/{pages → views}/Edit/Default/SetDocumentTitle/index.d.ts +1 -1
- package/dist/{pages → views}/Edit/Default/SetDocumentTitle/index.d.ts.map +1 -1
- package/dist/views/Edit/Default/SetDocumentTitle/index.js +28 -0
- package/dist/{pages → views}/Edit/Default/SetStepNav/index.d.ts +1 -1
- package/dist/{pages → views}/Edit/Default/SetStepNav/index.d.ts.map +1 -1
- package/dist/{pages → views}/Edit/Default/SetStepNav/index.js +12 -22
- package/dist/views/Edit/Default/index.d.ts.map +1 -0
- package/dist/views/Edit/Default/index.js +145 -0
- package/dist/{pages → views}/Edit/Default/types.d.ts.map +1 -1
- package/dist/views/Edit/Default/types.js +3 -0
- package/dist/views/Edit/index.client.d.ts +3 -0
- package/dist/views/Edit/index.client.d.ts.map +1 -0
- package/dist/views/Edit/index.client.js +56 -0
- package/dist/views/Edit/index.d.ts +4 -0
- package/dist/views/Edit/index.d.ts.map +1 -0
- package/dist/views/Edit/index.js +7 -0
- package/dist/{pages/API → views/Edit}/meta.d.ts +1 -1
- package/dist/views/Edit/meta.d.ts.map +1 -0
- package/dist/views/Edit/meta.js +26 -0
- package/dist/views/Edit/sanitizeEditViewProps.d.ts +3 -0
- package/dist/views/Edit/sanitizeEditViewProps.d.ts.map +1 -0
- package/dist/views/Edit/sanitizeEditViewProps.js +11 -0
- package/dist/views/ForgotPassword/index.d.ts +6 -0
- package/dist/views/ForgotPassword/index.d.ts.map +1 -0
- package/dist/views/ForgotPassword/index.js +58 -0
- package/dist/views/ForgotPassword/meta.d.ts +7 -0
- package/dist/views/ForgotPassword/meta.d.ts.map +1 -0
- package/dist/views/ForgotPassword/meta.js +11 -0
- package/dist/{pages → views}/List/Default/Cell/cellTypes.spec.js +21 -30
- package/dist/{pages → views}/List/Default/Cell/fields/Array/index.d.ts.map +1 -1
- package/dist/views/List/Default/Cell/fields/Array/index.js +12 -0
- package/dist/{pages → views}/List/Default/Cell/fields/Blocks/index.d.ts.map +1 -1
- package/dist/views/List/Default/Cell/fields/Blocks/index.js +30 -0
- package/dist/{pages → views}/List/Default/Cell/fields/Checkbox/index.d.ts.map +1 -1
- package/dist/views/List/Default/Cell/fields/Checkbox/index.js +8 -0
- package/dist/{pages → views}/List/Default/Cell/fields/Code/index.d.ts.map +1 -1
- package/dist/views/List/Default/Cell/fields/Code/index.js +14 -0
- package/dist/{pages → views}/List/Default/Cell/fields/Date/index.d.ts.map +1 -1
- package/dist/views/List/Default/Cell/fields/Date/index.js +11 -0
- package/dist/{pages → views}/List/Default/Cell/fields/File/index.d.ts.map +1 -1
- package/dist/{pages → views}/List/Default/Cell/fields/File/index.js +8 -23
- package/dist/{pages → views}/List/Default/Cell/fields/JSON/index.d.ts.map +1 -1
- package/dist/views/List/Default/Cell/fields/JSON/index.js +11 -0
- package/dist/{pages → views}/List/Default/Cell/fields/Relationship/index.d.ts.map +1 -1
- package/dist/views/List/Default/Cell/fields/Relationship/index.js +70 -0
- package/dist/{pages → views}/List/Default/Cell/fields/Select/index.d.ts.map +1 -1
- package/dist/{pages → views}/List/Default/Cell/fields/Select/index.js +10 -25
- package/dist/{pages → views}/List/Default/Cell/fields/Textarea/index.d.ts.map +1 -1
- package/dist/views/List/Default/Cell/fields/Textarea/index.js +8 -0
- package/dist/views/List/Default/Cell/fields/index.d.ts +17 -0
- package/dist/views/List/Default/Cell/fields/index.d.ts.map +1 -0
- package/dist/views/List/Default/Cell/fields/index.js +26 -0
- package/dist/views/List/Default/Cell/index.d.ts.map +1 -0
- package/dist/views/List/Default/Cell/index.js +75 -0
- package/dist/{pages → views}/List/Default/RelationshipProvider/index.d.ts.map +1 -1
- package/dist/views/List/Default/RelationshipProvider/index.js +89 -0
- package/dist/{pages → views}/List/Default/RelationshipProvider/reducer.d.ts +1 -1
- package/dist/{pages → views}/List/Default/RelationshipProvider/reducer.d.ts.map +1 -1
- package/dist/views/List/Default/RelationshipProvider/reducer.js +45 -0
- package/dist/views/List/Default/index.d.ts.map +1 -0
- package/dist/views/List/Default/index.js +130 -0
- package/dist/{pages → views}/List/Default/types.d.ts.map +1 -1
- package/dist/views/List/Default/types.js +3 -0
- package/dist/views/List/index.d.ts +5 -0
- package/dist/views/List/index.d.ts.map +1 -0
- package/dist/views/List/index.js +70 -0
- package/dist/views/List/meta.d.ts +7 -0
- package/dist/views/List/meta.d.ts.map +1 -0
- package/dist/views/List/meta.js +19 -0
- package/dist/{pages → views}/LivePreview/Context/collisionDetection.d.ts.map +1 -1
- package/dist/{pages → views}/LivePreview/Context/collisionDetection.js +6 -14
- package/dist/{pages → views}/LivePreview/Context/context.d.ts +2 -2
- package/dist/views/LivePreview/Context/context.d.ts.map +1 -0
- package/dist/views/LivePreview/Context/context.js +40 -0
- package/dist/{pages → views}/LivePreview/Context/index.d.ts +3 -3
- package/dist/views/LivePreview/Context/index.d.ts.map +1 -0
- package/dist/views/LivePreview/Context/index.js +157 -0
- package/dist/{pages → views}/LivePreview/Context/sizeReducer.d.ts.map +1 -1
- package/dist/{pages → views}/LivePreview/Context/sizeReducer.js +2 -12
- package/dist/{pages → views}/LivePreview/Device/index.d.ts.map +1 -1
- package/dist/views/LivePreview/Device/index.js +51 -0
- package/dist/{pages → views}/LivePreview/DeviceContainer/index.d.ts.map +1 -1
- package/dist/views/LivePreview/DeviceContainer/index.js +29 -0
- package/dist/{pages → views}/LivePreview/IFrame/index.d.ts.map +1 -1
- package/dist/views/LivePreview/IFrame/index.js +23 -0
- package/dist/{pages → views}/LivePreview/Preview/index.d.ts +1 -1
- package/dist/views/LivePreview/Preview/index.d.ts.map +1 -0
- package/dist/views/LivePreview/Preview/index.js +76 -0
- package/dist/{pages → views}/LivePreview/Toolbar/Controls/index.d.ts +1 -1
- package/dist/views/LivePreview/Toolbar/Controls/index.d.ts.map +1 -0
- package/dist/views/LivePreview/Toolbar/Controls/index.js +81 -0
- package/dist/{pages → views}/LivePreview/Toolbar/SizeInput/index.d.ts.map +1 -1
- package/dist/views/LivePreview/Toolbar/SizeInput/index.js +61 -0
- package/dist/{pages → views}/LivePreview/Toolbar/index.d.ts +1 -1
- package/dist/views/LivePreview/Toolbar/index.d.ts.map +1 -0
- package/dist/views/LivePreview/Toolbar/index.js +50 -0
- package/dist/{pages → views}/LivePreview/ToolbarArea/index.d.ts.map +1 -1
- package/dist/views/LivePreview/ToolbarArea/index.js +17 -0
- package/dist/views/LivePreview/index.client.d.ts.map +1 -0
- package/dist/views/LivePreview/index.client.js +142 -0
- package/dist/views/LivePreview/index.d.ts +4 -0
- package/dist/views/LivePreview/index.d.ts.map +1 -0
- package/dist/views/LivePreview/index.js +45 -0
- package/dist/{pages/Version → views/LivePreview}/meta.d.ts +1 -1
- package/dist/views/LivePreview/meta.d.ts.map +1 -0
- package/dist/views/LivePreview/meta.js +26 -0
- package/dist/{pages → views}/LivePreview/usePopupWindow.d.ts.map +1 -1
- package/dist/{pages → views}/LivePreview/usePopupWindow.js +11 -21
- package/dist/{pages → views}/Login/LoginForm/index.d.ts.map +1 -1
- package/dist/views/Login/LoginForm/index.js +58 -0
- package/dist/views/Login/index.d.ts +7 -0
- package/dist/views/Login/index.d.ts.map +1 -0
- package/dist/views/Login/index.js +29 -0
- package/dist/views/Login/index.scss +8 -0
- package/dist/views/Login/meta.d.ts +3 -0
- package/dist/views/Login/meta.d.ts.map +1 -0
- package/dist/views/Login/meta.js +11 -0
- package/dist/views/Logout/LogoutClient.d.ts.map +1 -0
- package/dist/views/Logout/LogoutClient.js +33 -0
- package/dist/views/Logout/index.d.ts +9 -0
- package/dist/views/Logout/index.d.ts.map +1 -0
- package/dist/views/Logout/index.js +26 -0
- package/dist/views/Logout/meta.d.ts +3 -0
- package/dist/views/Logout/meta.d.ts.map +1 -0
- package/dist/views/Logout/meta.js +11 -0
- package/dist/views/NotFound/index.client.d.ts +6 -0
- package/dist/views/NotFound/index.client.d.ts.map +1 -0
- package/dist/views/NotFound/index.client.js +38 -0
- package/dist/views/NotFound/index.d.ts +12 -0
- package/dist/views/NotFound/index.d.ts.map +1 -0
- package/dist/views/NotFound/index.js +20 -0
- package/dist/views/NotFound/meta.d.ts +7 -0
- package/dist/views/NotFound/meta.d.ts.map +1 -0
- package/dist/views/NotFound/meta.js +11 -0
- package/dist/views/ResetPassword/index.d.ts +7 -0
- package/dist/views/ResetPassword/index.d.ts.map +1 -0
- package/dist/views/ResetPassword/index.js +63 -0
- package/dist/views/ResetPassword/meta.d.ts +3 -0
- package/dist/views/ResetPassword/meta.d.ts.map +1 -0
- package/dist/views/ResetPassword/meta.js +11 -0
- package/dist/views/Root/index.d.ts +31 -0
- package/dist/views/Root/index.d.ts.map +1 -0
- package/dist/views/Root/index.js +174 -0
- package/dist/views/Root/meta.d.ts +14 -0
- package/dist/views/Root/meta.d.ts.map +1 -0
- package/dist/views/Root/meta.js +159 -0
- package/dist/views/Unauthorized/UnauthorizedClient.d.ts.map +1 -0
- package/dist/views/Unauthorized/UnauthorizedClient.js +15 -0
- package/dist/views/Unauthorized/index.d.ts +5 -0
- package/dist/views/Unauthorized/index.d.ts.map +1 -0
- package/dist/views/Unauthorized/index.js +11 -0
- package/dist/views/Unauthorized/meta.d.ts +3 -0
- package/dist/views/Unauthorized/meta.d.ts.map +1 -0
- package/dist/views/Unauthorized/meta.js +11 -0
- package/dist/views/Verify/index.d.ts +7 -0
- package/dist/views/Verify/index.d.ts.map +1 -0
- package/dist/views/Verify/index.js +33 -0
- package/dist/views/Verify/meta.d.ts +3 -0
- package/dist/views/Verify/meta.d.ts.map +1 -0
- package/dist/views/Verify/meta.js +11 -0
- package/dist/{pages → views}/Version/Default/SetStepNav.d.ts.map +1 -1
- package/dist/{pages → views}/Version/Default/SetStepNav.js +13 -23
- package/dist/{pages → views}/Version/Default/index.d.ts +1 -1
- package/dist/views/Version/Default/index.d.ts.map +1 -0
- package/dist/views/Version/Default/index.js +100 -0
- package/dist/{pages → views}/Version/Default/types.d.ts +2 -7
- package/dist/views/Version/Default/types.d.ts.map +1 -0
- package/dist/views/Version/Default/types.js +3 -0
- package/dist/{pages → views}/Version/RenderFieldsToDiff/Label/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/Label/index.js +9 -0
- package/dist/{pages → views}/Version/RenderFieldsToDiff/fields/Iterable/index.d.ts +1 -1
- package/dist/{pages → views}/Version/RenderFieldsToDiff/fields/Iterable/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.js +65 -0
- package/dist/{pages → views}/Version/RenderFieldsToDiff/fields/Nested/index.d.ts +1 -1
- package/dist/{pages → views}/Version/RenderFieldsToDiff/fields/Nested/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Nested/index.js +29 -0
- package/dist/{pages → views}/Version/RenderFieldsToDiff/fields/Relationship/index.d.ts +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.d.ts.map +1 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.js +75 -0
- package/dist/{pages → views}/Version/RenderFieldsToDiff/fields/Select/DiffViewer/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/DiffViewer/index.js +18 -0
- package/dist/{pages → views}/Version/RenderFieldsToDiff/fields/Select/index.d.ts +1 -1
- package/dist/{pages → views}/Version/RenderFieldsToDiff/fields/Select/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.js +39 -0
- package/dist/{pages → views}/Version/RenderFieldsToDiff/fields/Tabs/index.d.ts +1 -1
- package/dist/{pages → views}/Version/RenderFieldsToDiff/fields/Tabs/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.js +39 -0
- package/dist/{pages → views}/Version/RenderFieldsToDiff/fields/Text/DiffViewer/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Text/DiffViewer/index.js +18 -0
- package/dist/{pages → views}/Version/RenderFieldsToDiff/fields/Text/index.d.ts +1 -1
- package/dist/{pages → views}/Version/RenderFieldsToDiff/fields/Text/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.js +31 -0
- package/dist/{pages → views}/Version/RenderFieldsToDiff/fields/diffMethods.d.ts.map +1 -1
- package/dist/{pages → views}/Version/RenderFieldsToDiff/fields/diffMethods.js +2 -12
- package/dist/views/Version/RenderFieldsToDiff/fields/index.d.ts +25 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/index.d.ts.map +1 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/index.js +29 -0
- package/dist/{pages → views}/Version/RenderFieldsToDiff/fields/styles.d.ts.map +1 -1
- package/dist/{pages → views}/Version/RenderFieldsToDiff/fields/styles.js +2 -12
- package/dist/{pages → views}/Version/RenderFieldsToDiff/fields/types.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/types.js +3 -0
- package/dist/{pages → views}/Version/RenderFieldsToDiff/index.d.ts +1 -1
- package/dist/{pages → views}/Version/RenderFieldsToDiff/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/index.js +100 -0
- package/dist/{pages → views}/Version/RenderFieldsToDiff/types.d.ts +1 -1
- package/dist/{pages → views}/Version/RenderFieldsToDiff/types.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/types.js +3 -0
- package/dist/{pages → views}/Version/Restore/index.d.ts +1 -1
- package/dist/views/Version/Restore/index.d.ts.map +1 -0
- package/dist/views/Version/Restore/index.js +71 -0
- package/dist/{pages → views}/Version/Restore/types.d.ts.map +1 -1
- package/dist/views/Version/Restore/types.js +3 -0
- package/dist/{pages → views}/Version/SelectComparison/index.d.ts +1 -1
- package/dist/views/Version/SelectComparison/index.d.ts.map +1 -0
- package/dist/views/Version/SelectComparison/index.js +112 -0
- package/dist/{pages → views}/Version/SelectComparison/types.d.ts +1 -1
- package/dist/{pages → views}/Version/SelectComparison/types.d.ts.map +1 -1
- package/dist/views/Version/SelectComparison/types.js +3 -0
- package/dist/{pages → views}/Version/SelectLocales/index.d.ts +1 -1
- package/dist/views/Version/SelectLocales/index.d.ts.map +1 -0
- package/dist/views/Version/SelectLocales/index.js +33 -0
- package/dist/{pages → views}/Version/SelectLocales/types.d.ts.map +1 -1
- package/dist/views/Version/SelectLocales/types.js +3 -0
- package/dist/views/Version/index.d.ts +3 -0
- package/dist/views/Version/index.d.ts.map +1 -0
- package/dist/views/Version/index.js +89 -0
- package/dist/{pages/Edit → views/Version}/meta.d.ts +1 -1
- package/dist/views/Version/meta.d.ts.map +1 -0
- package/dist/views/Version/meta.js +37 -0
- package/dist/{pages → views}/Version/shared.d.ts.map +1 -1
- package/dist/views/Version/shared.js +10 -0
- package/dist/{pages → views}/Versions/buildColumns.d.ts.map +1 -1
- package/dist/views/Versions/buildColumns.js +54 -0
- package/dist/{pages → views}/Versions/cells/AutosaveCell/index.d.ts.map +1 -1
- package/dist/views/Versions/cells/AutosaveCell/index.js +12 -0
- package/dist/{pages → views}/Versions/cells/CreatedAt/index.d.ts.map +1 -1
- package/dist/views/Versions/cells/CreatedAt/index.js +19 -0
- package/dist/{pages → views}/Versions/cells/ID/index.d.ts.map +1 -1
- package/dist/views/Versions/cells/ID/index.js +9 -0
- package/dist/{pages → views}/Versions/index.client.d.ts +0 -3
- package/dist/views/Versions/index.client.d.ts.map +1 -0
- package/dist/views/Versions/index.client.js +93 -0
- package/dist/{pages → views}/Versions/index.d.ts +1 -1
- package/dist/views/Versions/index.d.ts.map +1 -0
- package/dist/views/Versions/index.js +87 -0
- package/dist/views/Versions/meta.d.ts +3 -0
- package/dist/views/Versions/meta.d.ts.map +1 -0
- package/dist/views/Versions/meta.js +33 -0
- package/dist/{pages → views}/Versions/types.d.ts.map +1 -1
- package/dist/views/Versions/types.js +3 -0
- package/dist/withPayload.d.ts +2 -1
- package/dist/withPayload.d.ts.map +1 -1
- package/dist/withPayload.js +3 -6
- package/package.json +27 -13
- package/src/index.ts +5 -1
- package/dist/layouts/Document/index.d.ts +0 -14
- package/dist/layouts/Document/index.d.ts.map +0 -1
- package/dist/layouts/Document/index.js +0 -82
- package/dist/pages/API/RenderJSON/index.js +0 -142
- package/dist/pages/API/index.client.d.ts +0 -5
- package/dist/pages/API/index.client.d.ts.map +0 -1
- package/dist/pages/API/index.client.js +0 -241
- package/dist/pages/API/index.d.ts +0 -4
- package/dist/pages/API/index.d.ts.map +0 -1
- package/dist/pages/API/index.js +0 -27
- package/dist/pages/API/meta.d.ts.map +0 -1
- package/dist/pages/API/meta.js +0 -21
- package/dist/pages/Account/Settings/index.js +0 -45
- package/dist/pages/Account/ToggleTheme/index.d.ts.map +0 -1
- package/dist/pages/Account/ToggleTheme/index.js +0 -87
- package/dist/pages/Account/index.d.ts +0 -13
- package/dist/pages/Account/index.d.ts.map +0 -1
- package/dist/pages/Account/index.js +0 -171
- package/dist/pages/CreateFirstUser/index.client.d.ts +0 -5
- package/dist/pages/CreateFirstUser/index.client.d.ts.map +0 -1
- package/dist/pages/CreateFirstUser/index.client.js +0 -29
- package/dist/pages/CreateFirstUser/index.d.ts +0 -11
- package/dist/pages/CreateFirstUser/index.d.ts.map +0 -1
- package/dist/pages/CreateFirstUser/index.js +0 -91
- package/dist/pages/Dashboard/Default/index.client.d.ts.map +0 -1
- package/dist/pages/Dashboard/Default/index.client.js +0 -154
- package/dist/pages/Dashboard/Default/index.d.ts.map +0 -1
- package/dist/pages/Dashboard/Default/index.js +0 -44
- package/dist/pages/Dashboard/index.d.ts +0 -13
- package/dist/pages/Dashboard/index.d.ts.map +0 -1
- package/dist/pages/Dashboard/index.js +0 -128
- package/dist/pages/Document/getCustomViewByKey.d.ts.map +0 -1
- package/dist/pages/Document/getCustomViewByKey.js +0 -15
- package/dist/pages/Document/getCustomViewByPath.d.ts.map +0 -1
- package/dist/pages/Document/getCustomViewByPath.js +0 -26
- package/dist/pages/Document/getMetaBySegment.d.ts +0 -20
- package/dist/pages/Document/getMetaBySegment.d.ts.map +0 -1
- package/dist/pages/Document/getMetaBySegment.js +0 -124
- package/dist/pages/Document/getViewsFromConfig.d.ts.map +0 -1
- package/dist/pages/Document/getViewsFromConfig.js +0 -224
- package/dist/pages/Document/index.d.ts +0 -23
- package/dist/pages/Document/index.d.ts.map +0 -1
- package/dist/pages/Document/index.js +0 -237
- package/dist/pages/Edit/Default/Auth/APIKey.js +0 -140
- package/dist/pages/Edit/Default/Auth/index.js +0 -180
- package/dist/pages/Edit/Default/Auth/types.js +0 -6
- package/dist/pages/Edit/Default/RenderCustomView.d.ts +0 -2
- package/dist/pages/Edit/Default/RenderCustomView.d.ts.map +0 -1
- package/dist/pages/Edit/Default/RenderCustomView.js +0 -3
- package/dist/pages/Edit/Default/SetDocumentTitle/index.js +0 -50
- package/dist/pages/Edit/Default/index.d.ts.map +0 -1
- package/dist/pages/Edit/Default/index.js +0 -202
- package/dist/pages/Edit/Default/types.js +0 -6
- package/dist/pages/Edit/index.client.d.ts +0 -4
- package/dist/pages/Edit/index.client.d.ts.map +0 -1
- package/dist/pages/Edit/index.client.js +0 -99
- package/dist/pages/Edit/index.d.ts +0 -4
- package/dist/pages/Edit/index.d.ts.map +0 -1
- package/dist/pages/Edit/index.js +0 -27
- package/dist/pages/Edit/meta.d.ts.map +0 -1
- package/dist/pages/Edit/meta.js +0 -36
- package/dist/pages/Edit/sanitizeEditViewProps.d.ts +0 -4
- package/dist/pages/Edit/sanitizeEditViewProps.d.ts.map +0 -1
- package/dist/pages/Edit/sanitizeEditViewProps.js +0 -24
- package/dist/pages/Edit/types.d.js +0 -7
- package/dist/pages/Edit/types.d.ts +0 -37
- package/dist/pages/Edit/types.d.ts.map +0 -1
- package/dist/pages/Edit/types.js +0 -6
- package/dist/pages/ForgotPassword/index.d.ts +0 -10
- package/dist/pages/ForgotPassword/index.d.ts.map +0 -1
- package/dist/pages/ForgotPassword/index.js +0 -101
- package/dist/pages/List/Default/Cell/fields/Array/index.js +0 -27
- package/dist/pages/List/Default/Cell/fields/Blocks/index.js +0 -45
- package/dist/pages/List/Default/Cell/fields/Checkbox/index.js +0 -23
- package/dist/pages/List/Default/Cell/fields/Code/index.js +0 -29
- package/dist/pages/List/Default/Cell/fields/Date/index.js +0 -26
- package/dist/pages/List/Default/Cell/fields/JSON/index.js +0 -26
- package/dist/pages/List/Default/Cell/fields/Relationship/index.js +0 -121
- package/dist/pages/List/Default/Cell/fields/Richtext/index.d.ts +0 -2
- package/dist/pages/List/Default/Cell/fields/Richtext/index.d.ts.map +0 -1
- package/dist/pages/List/Default/Cell/fields/Richtext/index.js +0 -3
- package/dist/pages/List/Default/Cell/fields/Textarea/index.js +0 -23
- package/dist/pages/List/Default/Cell/fields/index.d.ts +0 -17
- package/dist/pages/List/Default/Cell/fields/index.d.ts.map +0 -1
- package/dist/pages/List/Default/Cell/fields/index.js +0 -36
- package/dist/pages/List/Default/Cell/index.d.ts.map +0 -1
- package/dist/pages/List/Default/Cell/index.js +0 -89
- package/dist/pages/List/Default/RelationshipProvider/index.js +0 -153
- package/dist/pages/List/Default/RelationshipProvider/reducer.js +0 -55
- package/dist/pages/List/Default/index.d.ts.map +0 -1
- package/dist/pages/List/Default/index.js +0 -174
- package/dist/pages/List/Default/types.js +0 -6
- package/dist/pages/List/index.d.ts +0 -18
- package/dist/pages/List/index.d.ts.map +0 -1
- package/dist/pages/List/index.js +0 -158
- package/dist/pages/LivePreview/Context/context.d.ts.map +0 -1
- package/dist/pages/LivePreview/Context/context.js +0 -58
- package/dist/pages/LivePreview/Context/index.d.ts.map +0 -1
- package/dist/pages/LivePreview/Context/index.js +0 -208
- package/dist/pages/LivePreview/Device/index.js +0 -102
- package/dist/pages/LivePreview/DeviceContainer/index.js +0 -44
- package/dist/pages/LivePreview/IFrame/index.js +0 -74
- package/dist/pages/LivePreview/Preview/index.d.ts.map +0 -1
- package/dist/pages/LivePreview/Preview/index.js +0 -127
- package/dist/pages/LivePreview/Toolbar/Controls/index.d.ts.map +0 -1
- package/dist/pages/LivePreview/Toolbar/Controls/index.js +0 -96
- package/dist/pages/LivePreview/Toolbar/SizeInput/index.js +0 -112
- package/dist/pages/LivePreview/Toolbar/index.d.ts.map +0 -1
- package/dist/pages/LivePreview/Toolbar/index.js +0 -65
- package/dist/pages/LivePreview/ToolbarArea/index.js +0 -32
- package/dist/pages/LivePreview/index.client.d.ts.map +0 -1
- package/dist/pages/LivePreview/index.client.js +0 -195
- package/dist/pages/LivePreview/index.d.ts +0 -5
- package/dist/pages/LivePreview/index.d.ts.map +0 -1
- package/dist/pages/LivePreview/index.js +0 -59
- package/dist/pages/LivePreview/meta.d.ts.map +0 -1
- package/dist/pages/LivePreview/meta.js +0 -36
- package/dist/pages/Login/LoginForm/index.js +0 -67
- package/dist/pages/Login/index.d.ts +0 -14
- package/dist/pages/Login/index.d.ts.map +0 -1
- package/dist/pages/Login/index.js +0 -108
- package/dist/pages/Login/index.scss +0 -38
- package/dist/pages/Logout/LogoutClient.d.ts.map +0 -1
- package/dist/pages/Logout/LogoutClient.js +0 -88
- package/dist/pages/Logout/index.d.ts +0 -16
- package/dist/pages/Logout/index.d.ts.map +0 -1
- package/dist/pages/Logout/index.js +0 -61
- package/dist/pages/NotFound/index.d.ts +0 -7
- package/dist/pages/NotFound/index.d.ts.map +0 -1
- package/dist/pages/NotFound/index.js +0 -48
- package/dist/pages/ResetPassword/index.d.ts +0 -12
- package/dist/pages/ResetPassword/index.d.ts.map +0 -1
- package/dist/pages/ResetPassword/index.js +0 -99
- package/dist/pages/Root/index.d.ts +0 -5
- package/dist/pages/Root/index.d.ts.map +0 -1
- package/dist/pages/Root/index.js +0 -17
- package/dist/pages/Unauthorized/UnauthorizedClient.d.ts.map +0 -1
- package/dist/pages/Unauthorized/UnauthorizedClient.js +0 -27
- package/dist/pages/Unauthorized/index.d.ts +0 -10
- package/dist/pages/Unauthorized/index.d.ts.map +0 -1
- package/dist/pages/Unauthorized/index.js +0 -51
- package/dist/pages/Verify/index.d.ts +0 -13
- package/dist/pages/Verify/index.d.ts.map +0 -1
- package/dist/pages/Verify/index.js +0 -90
- package/dist/pages/Version/Default/index.d.ts.map +0 -1
- package/dist/pages/Version/Default/index.js +0 -157
- package/dist/pages/Version/Default/types.d.ts.map +0 -1
- package/dist/pages/Version/Default/types.js +0 -6
- package/dist/pages/Version/RenderFieldsToDiff/Label/index.js +0 -24
- package/dist/pages/Version/RenderFieldsToDiff/fields/Iterable/index.js +0 -80
- package/dist/pages/Version/RenderFieldsToDiff/fields/Nested/index.js +0 -44
- package/dist/pages/Version/RenderFieldsToDiff/fields/Relationship/index.d.ts.map +0 -1
- package/dist/pages/Version/RenderFieldsToDiff/fields/Relationship/index.js +0 -89
- package/dist/pages/Version/RenderFieldsToDiff/fields/Select/DiffViewer/index.js +0 -72
- package/dist/pages/Version/RenderFieldsToDiff/fields/Select/index.js +0 -54
- package/dist/pages/Version/RenderFieldsToDiff/fields/Tabs/index.js +0 -54
- package/dist/pages/Version/RenderFieldsToDiff/fields/Text/DiffViewer/index.js +0 -72
- package/dist/pages/Version/RenderFieldsToDiff/fields/Text/index.js +0 -46
- package/dist/pages/Version/RenderFieldsToDiff/fields/index.d.ts +0 -25
- package/dist/pages/Version/RenderFieldsToDiff/fields/index.d.ts.map +0 -1
- package/dist/pages/Version/RenderFieldsToDiff/fields/index.js +0 -44
- package/dist/pages/Version/RenderFieldsToDiff/fields/types.js +0 -6
- package/dist/pages/Version/RenderFieldsToDiff/index.js +0 -115
- package/dist/pages/Version/RenderFieldsToDiff/types.js +0 -6
- package/dist/pages/Version/Restore/index.d.ts.map +0 -1
- package/dist/pages/Version/Restore/index.js +0 -121
- package/dist/pages/Version/Restore/types.js +0 -6
- package/dist/pages/Version/SelectComparison/index.d.ts.map +0 -1
- package/dist/pages/Version/SelectComparison/index.js +0 -167
- package/dist/pages/Version/SelectComparison/types.js +0 -6
- package/dist/pages/Version/SelectLocales/index.d.ts.map +0 -1
- package/dist/pages/Version/SelectLocales/index.js +0 -47
- package/dist/pages/Version/SelectLocales/types.js +0 -6
- package/dist/pages/Version/index.d.ts +0 -4
- package/dist/pages/Version/index.d.ts.map +0 -1
- package/dist/pages/Version/index.js +0 -111
- package/dist/pages/Version/meta.d.ts.map +0 -1
- package/dist/pages/Version/meta.js +0 -47
- package/dist/pages/Version/shared.js +0 -28
- package/dist/pages/Versions/buildColumns.js +0 -69
- package/dist/pages/Versions/cells/AutosaveCell/index.js +0 -63
- package/dist/pages/Versions/cells/CreatedAt/index.js +0 -33
- package/dist/pages/Versions/cells/ID/index.js +0 -60
- package/dist/pages/Versions/index.client.d.ts.map +0 -1
- package/dist/pages/Versions/index.client.js +0 -142
- package/dist/pages/Versions/index.d.ts.map +0 -1
- package/dist/pages/Versions/index.js +0 -125
- package/dist/pages/Versions/meta.d.ts +0 -3
- package/dist/pages/Versions/meta.d.ts.map +0 -1
- package/dist/pages/Versions/meta.js +0 -43
- package/dist/pages/Versions/types.js +0 -6
- package/dist/utilities/createClientConfig.d.ts +0 -5
- package/dist/utilities/createClientConfig.d.ts.map +0 -1
- package/dist/utilities/createClientConfig.js +0 -120
- /package/dist/{pages → views}/API/RenderJSON/index.d.ts +0 -0
- /package/dist/{pages → views}/API/RenderJSON/index.scss +0 -0
- /package/dist/{pages → views}/API/index.scss +0 -0
- /package/dist/{pages → views}/Account/Settings/index.d.ts +0 -0
- /package/dist/{pages → views}/Account/Settings/index.scss +0 -0
- /package/dist/{pages → views}/Account/ToggleTheme/index.d.ts +0 -0
- /package/dist/{pages → views}/CreateFirstUser/index.scss +0 -0
- /package/dist/{pages → views}/Dashboard/Default/index.scss +0 -0
- /package/dist/{pages → views}/Edit/Default/Auth/APIKey.d.ts +0 -0
- /package/dist/{pages → views}/Edit/Default/Auth/index.scss +0 -0
- /package/dist/{pages → views}/Edit/Default/Auth/types.d.ts +0 -0
- /package/dist/{pages → views}/Edit/Default/index.d.ts +0 -0
- /package/dist/{pages → views}/Edit/Default/index.scss +0 -0
- /package/dist/{pages → views}/Edit/Default/types.d.ts +0 -0
- /package/dist/{pages → views}/List/Default/Cell/fields/Array/index.d.ts +0 -0
- /package/dist/{pages → views}/List/Default/Cell/fields/Blocks/index.d.ts +0 -0
- /package/dist/{pages → views}/List/Default/Cell/fields/Checkbox/index.d.ts +0 -0
- /package/dist/{pages → views}/List/Default/Cell/fields/Checkbox/index.scss +0 -0
- /package/dist/{pages → views}/List/Default/Cell/fields/Code/index.d.ts +0 -0
- /package/dist/{pages → views}/List/Default/Cell/fields/Code/index.scss +0 -0
- /package/dist/{pages → views}/List/Default/Cell/fields/Date/index.d.ts +0 -0
- /package/dist/{pages → views}/List/Default/Cell/fields/File/index.d.ts +0 -0
- /package/dist/{pages → views}/List/Default/Cell/fields/File/index.scss +0 -0
- /package/dist/{pages → views}/List/Default/Cell/fields/JSON/index.d.ts +0 -0
- /package/dist/{pages → views}/List/Default/Cell/fields/JSON/index.scss +0 -0
- /package/dist/{pages → views}/List/Default/Cell/fields/Relationship/index.d.ts +0 -0
- /package/dist/{pages → views}/List/Default/Cell/fields/Relationship/index.scss +0 -0
- /package/dist/{pages → views}/List/Default/Cell/fields/Select/index.d.ts +0 -0
- /package/dist/{pages → views}/List/Default/Cell/fields/Textarea/index.d.ts +0 -0
- /package/dist/{pages → views}/List/Default/Cell/index.d.ts +0 -0
- /package/dist/{pages → views}/List/Default/RelationshipProvider/index.d.ts +0 -0
- /package/dist/{pages → views}/List/Default/index.d.ts +0 -0
- /package/dist/{pages → views}/List/Default/index.scss +0 -0
- /package/dist/{pages → views}/List/Default/types.d.ts +0 -0
- /package/dist/{pages → views}/LivePreview/Context/collisionDetection.d.ts +0 -0
- /package/dist/{pages → views}/LivePreview/Context/sizeReducer.d.ts +0 -0
- /package/dist/{pages → views}/LivePreview/Device/index.d.ts +0 -0
- /package/dist/{pages → views}/LivePreview/DeviceContainer/index.d.ts +0 -0
- /package/dist/{pages → views}/LivePreview/IFrame/index.d.ts +0 -0
- /package/dist/{pages → views}/LivePreview/IFrame/index.scss +0 -0
- /package/dist/{pages → views}/LivePreview/Preview/index.scss +0 -0
- /package/dist/{pages → views}/LivePreview/Toolbar/Controls/index.scss +0 -0
- /package/dist/{pages → views}/LivePreview/Toolbar/SizeInput/index.d.ts +0 -0
- /package/dist/{pages → views}/LivePreview/Toolbar/SizeInput/index.scss +0 -0
- /package/dist/{pages → views}/LivePreview/Toolbar/index.scss +0 -0
- /package/dist/{pages → views}/LivePreview/ToolbarArea/index.d.ts +0 -0
- /package/dist/{pages → views}/LivePreview/ToolbarArea/index.scss +0 -0
- /package/dist/{pages → views}/LivePreview/index.client.d.ts +0 -0
- /package/dist/{pages → views}/LivePreview/index.scss +0 -0
- /package/dist/{pages → views}/LivePreview/usePopupWindow.d.ts +0 -0
- /package/dist/{pages → views}/Login/LoginForm/index.d.ts +0 -0
- /package/dist/{pages → views}/Login/LoginForm/index.scss +0 -0
- /package/dist/{pages → views}/Logout/LogoutClient.d.ts +0 -0
- /package/dist/{pages → views}/Logout/index.scss +0 -0
- /package/dist/{pages → views}/NotFound/index.scss +0 -0
- /package/dist/{pages → views}/ResetPassword/index.scss +0 -0
- /package/dist/{pages → views}/Unauthorized/UnauthorizedClient.d.ts +0 -0
- /package/dist/{pages → views}/Verify/index.scss +0 -0
- /package/dist/{pages → views}/Version/Default/SetStepNav.d.ts +0 -0
- /package/dist/{pages → views}/Version/Default/index.scss +0 -0
- /package/dist/{pages → views}/Version/RenderFieldsToDiff/Label/index.d.ts +0 -0
- /package/dist/{pages → views}/Version/RenderFieldsToDiff/Label/index.scss +0 -0
- /package/dist/{pages → views}/Version/RenderFieldsToDiff/fields/Iterable/index.scss +0 -0
- /package/dist/{pages → views}/Version/RenderFieldsToDiff/fields/Nested/index.scss +0 -0
- /package/dist/{pages → views}/Version/RenderFieldsToDiff/fields/Relationship/index.scss +0 -0
- /package/dist/{pages → views}/Version/RenderFieldsToDiff/fields/Select/DiffViewer/index.d.ts +0 -0
- /package/dist/{pages → views}/Version/RenderFieldsToDiff/fields/Select/index.scss +0 -0
- /package/dist/{pages → views}/Version/RenderFieldsToDiff/fields/Text/DiffViewer/index.d.ts +0 -0
- /package/dist/{pages → views}/Version/RenderFieldsToDiff/fields/Text/index.scss +0 -0
- /package/dist/{pages → views}/Version/RenderFieldsToDiff/fields/diffMethods.d.ts +0 -0
- /package/dist/{pages → views}/Version/RenderFieldsToDiff/fields/styles.d.ts +0 -0
- /package/dist/{pages → views}/Version/RenderFieldsToDiff/fields/types.d.ts +0 -0
- /package/dist/{pages → views}/Version/RenderFieldsToDiff/index.scss +0 -0
- /package/dist/{pages → views}/Version/Restore/index.scss +0 -0
- /package/dist/{pages → views}/Version/Restore/types.d.ts +0 -0
- /package/dist/{pages → views}/Version/SelectComparison/index.scss +0 -0
- /package/dist/{pages → views}/Version/SelectLocales/index.scss +0 -0
- /package/dist/{pages → views}/Version/SelectLocales/types.d.ts +0 -0
- /package/dist/{pages → views}/Version/shared.d.ts +0 -0
- /package/dist/{pages → views}/Versions/buildColumns.d.ts +0 -0
- /package/dist/{pages → views}/Versions/cells/AutosaveCell/index.d.ts +0 -0
- /package/dist/{pages → views}/Versions/cells/CreatedAt/index.d.ts +0 -0
- /package/dist/{pages → views}/Versions/cells/ID/index.d.ts +0 -0
- /package/dist/{pages → views}/Versions/index.scss +0 -0
- /package/dist/{pages → views}/Versions/types.d.ts +0 -0
|
@@ -1,22 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "unlock", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return unlock;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _httpstatus = /*#__PURE__*/ _interop_require_default(require("http-status"));
|
|
12
|
-
const _operations = require("payload/operations");
|
|
13
|
-
function _interop_require_default(obj) {
|
|
14
|
-
return obj && obj.__esModule ? obj : {
|
|
15
|
-
default: obj
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
const unlock = async ({ collection, req })=>{
|
|
19
|
-
await (0, _operations.unlockOperation)({
|
|
1
|
+
import httpStatus from 'http-status';
|
|
2
|
+
import { unlockOperation } from 'payload/operations';
|
|
3
|
+
export const unlock = async ({ collection, req })=>{
|
|
4
|
+
await unlockOperation({
|
|
20
5
|
collection,
|
|
21
6
|
data: {
|
|
22
7
|
email: req.data.email
|
|
@@ -27,8 +12,8 @@ const unlock = async ({ collection, req })=>{
|
|
|
27
12
|
// TODO(translate)
|
|
28
13
|
message: 'Success'
|
|
29
14
|
}, {
|
|
30
|
-
status:
|
|
15
|
+
status: httpStatus.OK
|
|
31
16
|
});
|
|
32
17
|
};
|
|
33
18
|
|
|
34
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
19
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9yb3V0ZXMvcmVzdC9hdXRoL3VubG9jay50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgaHR0cFN0YXR1cyBmcm9tICdodHRwLXN0YXR1cydcbmltcG9ydCB7IHVubG9ja09wZXJhdGlvbiB9IGZyb20gJ3BheWxvYWQvb3BlcmF0aW9ucydcblxuaW1wb3J0IHR5cGUgeyBDb2xsZWN0aW9uUm91dGVIYW5kbGVyIH0gZnJvbSAnLi4vdHlwZXMuZC50cydcblxuZXhwb3J0IGNvbnN0IHVubG9jazogQ29sbGVjdGlvblJvdXRlSGFuZGxlciA9IGFzeW5jICh7IGNvbGxlY3Rpb24sIHJlcSB9KSA9P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AE,4BAA4B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"verifyEmail.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/auth/verifyEmail.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAA;AAEjE,eAAO,MAAM,WAAW,EAAE,4BAgBzB,CAAA"}
|
|
@@ -1,22 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "verifyEmail", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return verifyEmail;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _httpstatus = /*#__PURE__*/ _interop_require_default(require("http-status"));
|
|
12
|
-
const _operations = require("payload/operations");
|
|
13
|
-
function _interop_require_default(obj) {
|
|
14
|
-
return obj && obj.__esModule ? obj : {
|
|
15
|
-
default: obj
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
const verifyEmail = async ({ id, collection, req })=>{
|
|
19
|
-
await (0, _operations.verifyEmailOperation)({
|
|
1
|
+
import httpStatus from 'http-status';
|
|
2
|
+
import { verifyEmailOperation } from 'payload/operations';
|
|
3
|
+
export const verifyEmail = async ({ id, collection, req })=>{
|
|
4
|
+
await verifyEmailOperation({
|
|
20
5
|
collection,
|
|
21
6
|
req,
|
|
22
7
|
token: id
|
|
@@ -25,8 +10,8 @@ const verifyEmail = async ({ id, collection, req })=>{
|
|
|
25
10
|
// TODO(translate)
|
|
26
11
|
message: 'Email verified successfully.'
|
|
27
12
|
}, {
|
|
28
|
-
status:
|
|
13
|
+
status: httpStatus.OK
|
|
29
14
|
});
|
|
30
15
|
};
|
|
31
16
|
|
|
32
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
17
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy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QUUsRUFBRUMsVUFBVSxFQUFFQyxHQUFHLEVBQUU7SUFDckYsTUFBTUoscUJBQXFCO1FBQ3pCRztRQUNBQztRQUNBQyxPQUFPSDtJQUNUO0lBRUEsT0FBT0ksU0FBU0MsSUFBSSxDQUNsQjtRQUNFLGtCQUFrQjtRQUNsQkMsU0FBUztJQUNYLEdBQ0E7UUFDRUMsUUFBUVYsV0FBV1csRUFBRTtJQUN2QjtBQUVKLEVBQUMifQ==
|
|
@@ -1,41 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
buildFormState: function() {
|
|
13
|
-
return buildFormState;
|
|
14
|
-
},
|
|
15
|
-
getFieldSchemaMap: function() {
|
|
16
|
-
return getFieldSchemaMap;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
const _ui = require("@payloadcms/ui");
|
|
20
|
-
const _httpstatus = /*#__PURE__*/ _interop_require_default(require("http-status"));
|
|
21
|
-
function _interop_require_default(obj) {
|
|
22
|
-
return obj && obj.__esModule ? obj : {
|
|
23
|
-
default: obj
|
|
24
|
-
};
|
|
25
|
-
}
|
|
1
|
+
import { buildFieldSchemaMap, buildStateFromSchema, reduceFieldsToValues } from '@payloadcms/ui';
|
|
2
|
+
import httpStatus from 'http-status';
|
|
26
3
|
let cached = global._payload_fieldSchemaMap;
|
|
27
4
|
if (!cached) {
|
|
28
5
|
// eslint-disable-next-line no-multi-assign
|
|
29
6
|
cached = global._payload_fieldSchemaMap = null;
|
|
30
7
|
}
|
|
31
|
-
const getFieldSchemaMap = (config)=>{
|
|
32
|
-
if (cached) {
|
|
8
|
+
export const getFieldSchemaMap = (config)=>{
|
|
9
|
+
if (cached && process.env.NODE_ENV !== 'development') {
|
|
33
10
|
return cached;
|
|
34
11
|
}
|
|
35
|
-
cached =
|
|
12
|
+
cached = buildFieldSchemaMap(config);
|
|
36
13
|
return cached;
|
|
37
14
|
};
|
|
38
|
-
const buildFormState = async ({ req })=>{
|
|
15
|
+
export const buildFormState = async ({ req })=>{
|
|
39
16
|
const { locale, t, user } = req;
|
|
40
17
|
const reqData = req.data;
|
|
41
18
|
// TODO: run ADMIN access control for user
|
|
@@ -56,10 +33,10 @@ const buildFormState = async ({ req })=>{
|
|
|
56
33
|
return Response.json({
|
|
57
34
|
message: 'Could not find field schema for given path'
|
|
58
35
|
}, {
|
|
59
|
-
status:
|
|
36
|
+
status: httpStatus.BAD_REQUEST
|
|
60
37
|
});
|
|
61
38
|
}
|
|
62
|
-
const data = incomingData ||
|
|
39
|
+
const data = incomingData || reduceFieldsToValues(formState || {}, true);
|
|
63
40
|
let id;
|
|
64
41
|
let docPreferencesKey;
|
|
65
42
|
if (collectionSlug) {
|
|
@@ -80,7 +57,7 @@ const buildFormState = async ({ req })=>{
|
|
|
80
57
|
}
|
|
81
58
|
}
|
|
82
59
|
});
|
|
83
|
-
const result = await
|
|
60
|
+
const result = await buildStateFromSchema({
|
|
84
61
|
id,
|
|
85
62
|
data,
|
|
86
63
|
fieldSchema,
|
|
@@ -89,8 +66,8 @@ const buildFormState = async ({ req })=>{
|
|
|
89
66
|
req
|
|
90
67
|
});
|
|
91
68
|
return Response.json(result, {
|
|
92
|
-
status:
|
|
69
|
+
status: httpStatus.OK
|
|
93
70
|
});
|
|
94
71
|
};
|
|
95
72
|
|
|
96
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
73
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9yb3V0ZXMvcmVzdC9idWlsZEZvcm1TdGF0ZS50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdHlwZSB7IEJ1aWxkRm9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BQUVDLE9BQU9DLGNBQWMsRUFBRSxHQUFHO1FBQUVELE9BQU87SUFBSyxDQUFDLENBQUMsR0FBRyxFQUFFLEVBQUUsR0FBSSxNQUFNakMsSUFBSU8sT0FBTyxDQUFDYyxJQUFJLENBQUM7UUFDM0ZjLFlBQVk7UUFDWkMsT0FBTztRQUNQQyxPQUFPO1FBQ1BDLE9BQU87WUFDTEMsS0FBSztnQkFDSEMsUUFBUVQ7WUFDVjtRQUNGO0lBQ0Y7SUFFQSxNQUFNVSxTQUFTLE1BQU1yRCxxQkFBcUI7UUFDeEMwQztRQUNBekI7UUFDQVc7UUFDQUo7UUFDQThCLGFBQWFSO1FBQ2JsQztJQUNGO0lBRUEsT0FBT3lCLFNBQVNDLElBQUksQ0FBQ2UsUUFBUTtRQUMzQmIsUUFBUXRDLFdBQVdxRCxFQUFFO0lBQ3ZCO0FBQ0YsRUFBQyJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkEndpoints.d.ts","sourceRoot":"","sources":["../../../src/routes/rest/checkEndpoints.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"checkEndpoints.d.ts","sourceRoot":"","sources":["../../../src/routes/rest/checkEndpoints.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB;eAIpB,KAAK,GAAG,OAAO,EAAE;aACnB,QAAQ,OAAO,CAAC;cAY1B,CAAA"}
|
|
@@ -1,27 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "endpointsAreDisabled", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return endpointsAreDisabled;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _httpstatus = /*#__PURE__*/ _interop_require_default(require("http-status"));
|
|
12
|
-
function _interop_require_default(obj) {
|
|
13
|
-
return obj && obj.__esModule ? obj : {
|
|
14
|
-
default: obj
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
const endpointsAreDisabled = ({ endpoints, request })=>{
|
|
1
|
+
import httpStatus from 'http-status';
|
|
2
|
+
export const endpointsAreDisabled = ({ endpoints, request })=>{
|
|
18
3
|
if (!endpoints) {
|
|
19
4
|
return Response.json({
|
|
20
5
|
message: `Cannot ${request.method.toUpperCase()} ${request.url}`
|
|
21
6
|
}, {
|
|
22
|
-
status:
|
|
7
|
+
status: httpStatus.NOT_IMPLEMENTED
|
|
23
8
|
});
|
|
24
9
|
}
|
|
25
10
|
};
|
|
26
11
|
|
|
27
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
12
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9yb3V0ZXMvcmVzdC9jaGVja0VuZHBvaW50cy50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgaHR0cFN0YXR1cyBmcm9tICdodHRwLXN0YXR1cydcblxuZXhwb3J0IGNvbnN0IGVuZHBvaW50c0FyZURpc2FibGVkID0gKHtcbiAgZW5kcG9pbnRzLFxuICByZXF1ZXN0LFxufToge1xuICBlbmRwb2ludHM6IGZhbHNlIHwgdW5rbm93bltdXG4gIHJlcXVlc3Q6IFBhcnRpYWw8UmVxdWVzdD5cbn0pID0+IHtcbiAgaWYgKCFlbmRwb2ludHMpIHtcbiAgICByZXR1cm4gUmVzcG9uc2UuanNvbihcbiAgICAgIHtcbiAgICAgICAgbWVzc2FnZTogYENhbm5vdCAke3JlcXVlc3QubWV0aG9kLnRvVXBwZXJDYXNlKCl9ICR7cmVxdWVzdC51cmx9YCxcbiAgICAgIH0sXG4gICAgICB7XG4gICAgICAgIHN0YXR1czogaHR0cFN0YXR1cy5OT1RfSU1QTEVNRU5URUQsXG4gICAgICB9LFxuICAgIClcbiAgfVxufVxuIl0sIm5hbWVzIjpbImh0dHBTdGF0dXMiLCJlbmRwb2ludHNBcmVEaXNhYmxlZCIsImVuZHBvaW50cyIsInJlcXVlc3QiLCJSZXNwb25zZSIsImpzb24iLCJtZXNzYWdlIiwibWV0aG9kIiwidG9VcHBlckNhc2UiLCJ1cmwiLCJzdGF0dXMiLCJOT1RfSU1QTEVNRU5URUQiXSwibWFwcGluZ3MiOiJBQUFBLE9BQU9BLGdCQUFnQixjQUFhO0FBRXBDLE9BQU8sTUFBTUMsdUJBQXVCLENBQUMsRUFDbkNDLFNBQVMsRUFDVEMsT0FBTyxFQUlSO0lBQ0MsSUFBSSxDQUFDRCxXQUFXO1FBQ2QsT0FBT0UsU0FBU0MsSUFBSSxDQUNsQjtZQUNFQyxTQUFTLENBQUMsT0FBTyxFQUFFSCxRQUFRSSxNQUFNLENBQUNDLFdBQVcsR0FBRyxDQUFDLEVBQUVMLFFBQVFNLEdBQUcsQ0FBQyxDQUFDO1FBQ2xFLEdBQ0E7WUFDRUMsUUFBUVYsV0FBV1csZUFBZTtRQUNwQztJQUVKO0FBQ0YsRUFBQyJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/collections/create.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/collections/create.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAE3D,eAAO,MAAM,MAAM,EAAE,sBA0BpB,CAAA"}
|
|
@@ -1,31 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
})
|
|
5
|
-
Object.defineProperty(exports, "create", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return create;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _httpstatus = /*#__PURE__*/ _interop_require_default(require("http-status"));
|
|
12
|
-
const _operations = require("payload/operations");
|
|
13
|
-
const _utilities = require("payload/utilities");
|
|
14
|
-
function _interop_require_default(obj) {
|
|
15
|
-
return obj && obj.__esModule ? obj : {
|
|
16
|
-
default: obj
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
const create = async ({ collection, req })=>{
|
|
1
|
+
import httpStatus from 'http-status';
|
|
2
|
+
import { createOperation } from 'payload/operations';
|
|
3
|
+
import { isNumber } from 'payload/utilities';
|
|
4
|
+
export const create = async ({ collection, req })=>{
|
|
20
5
|
const { searchParams } = req;
|
|
21
6
|
const autosave = searchParams.get('autosave') === 'true';
|
|
22
7
|
const draft = searchParams.get('draft') === 'true';
|
|
23
8
|
const depth = searchParams.get('depth');
|
|
24
|
-
const doc = await
|
|
9
|
+
const doc = await createOperation({
|
|
25
10
|
autosave,
|
|
26
11
|
collection,
|
|
27
12
|
data: req.data,
|
|
28
|
-
depth:
|
|
13
|
+
depth: isNumber(depth) ? depth : undefined,
|
|
29
14
|
draft,
|
|
30
15
|
req
|
|
31
16
|
});
|
|
@@ -35,8 +20,8 @@ const create = async ({ collection, req })=>{
|
|
|
35
20
|
label: collection.config.labels.singular
|
|
36
21
|
})
|
|
37
22
|
}, {
|
|
38
|
-
status:
|
|
23
|
+
status: httpStatus.CREATED
|
|
39
24
|
});
|
|
40
25
|
};
|
|
41
26
|
|
|
42
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
27
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9yb3V0ZXMvcmVzdC9jb2xsZWN0aW9ucy9jcmVhdGUudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGh0dHBTdGF0dXMgZnJvbSAnaHR0cC1zdGF0dXMnXG5pbXBvcnQgeyBjcmVhdGVPcGVyYXRpb24gfSBmcm9tICdwYXlsb2FkL29wZXJhdGlvbnMnXG5pbXBvcnQgeyBpc051bWJl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FBQyJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/collections/delete.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/collections/delete.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAE3D,eAAO,MAAM,SAAS,EAAE,sBAqDvB,CAAA"}
|
|
@@ -1,57 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
get: function() {
|
|
8
|
-
return deleteDoc;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _translations = require("@payloadcms/translations");
|
|
12
|
-
const _httpstatus = /*#__PURE__*/ _interop_require_default(require("http-status"));
|
|
13
|
-
const _operations = require("payload/operations");
|
|
14
|
-
const _utilities = require("payload/utilities");
|
|
15
|
-
const _qs = /*#__PURE__*/ _interop_require_default(require("qs"));
|
|
16
|
-
function _interop_require_default(obj) {
|
|
17
|
-
return obj && obj.__esModule ? obj : {
|
|
18
|
-
default: obj
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
const deleteDoc = async ({ collection, req })=>{
|
|
1
|
+
import { getTranslation } from '@payloadcms/translations';
|
|
2
|
+
import httpStatus from 'http-status';
|
|
3
|
+
import { deleteOperation } from 'payload/operations';
|
|
4
|
+
import { isNumber } from 'payload/utilities';
|
|
5
|
+
import qs from 'qs';
|
|
6
|
+
export const deleteDoc = async ({ collection, req })=>{
|
|
22
7
|
const { searchParams } = req;
|
|
23
8
|
// parse using `qs` to handle `where` queries
|
|
24
|
-
const { depth, where } =
|
|
25
|
-
const result = await
|
|
9
|
+
const { depth, where } = qs.parse(searchParams.toString());
|
|
10
|
+
const result = await deleteOperation({
|
|
26
11
|
collection,
|
|
27
|
-
depth:
|
|
12
|
+
depth: isNumber(depth) ? Number(depth) : undefined,
|
|
28
13
|
req,
|
|
29
14
|
where
|
|
30
15
|
});
|
|
31
16
|
if (result.errors.length === 0) {
|
|
32
17
|
const message = req.t('general:deletedCountSuccessfully', {
|
|
33
18
|
count: result.docs.length,
|
|
34
|
-
label:
|
|
19
|
+
label: getTranslation(collection.config.labels[result.docs.length > 1 ? 'plural' : 'singular'], req.i18n)
|
|
35
20
|
});
|
|
36
21
|
return Response.json({
|
|
37
22
|
...result,
|
|
38
23
|
message
|
|
39
24
|
}, {
|
|
40
|
-
status:
|
|
25
|
+
status: httpStatus.OK
|
|
41
26
|
});
|
|
42
27
|
}
|
|
43
28
|
const total = result.docs.length + result.errors.length;
|
|
44
29
|
const message = req.t('error:unableToDeleteCount', {
|
|
45
30
|
count: result.errors.length,
|
|
46
|
-
label:
|
|
31
|
+
label: getTranslation(collection.config.labels[total > 1 ? 'plural' : 'singular'], req.i18n),
|
|
47
32
|
total
|
|
48
33
|
});
|
|
49
34
|
return Response.json({
|
|
50
35
|
...result,
|
|
51
36
|
message
|
|
52
37
|
}, {
|
|
53
|
-
status:
|
|
38
|
+
status: httpStatus.BAD_REQUEST
|
|
54
39
|
});
|
|
55
40
|
};
|
|
56
41
|
|
|
57
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
42
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9yb3V0ZXMvcmVzdC9jb2xsZWN0aW9ucy9kZWxldGUudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR5cGUgeyBXaGVyZSB9IGZyb20gJ3BheWxvYWQvdHlwZXMnXG5cbmltcG9ydCB7IGdldFRyYW5zbGF0aW9uIH0gZnJvbSAnQHBheWxvYWRjbXMvdHJhbnNsYXRpb25zJ1xuaW1wb3J0IGh0dHBTdGF0dX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V0FBVyxFQUN4RVYsSUFBSWtCLElBQUk7UUFFWjtRQUVBLE9BQU9DLFNBQVNDLElBQUksQ0FDbEI7WUFDRSxHQUFHZCxNQUFNO1lBQ1RLO1FBQ0YsR0FDQTtZQUNFVSxRQUFRM0IsV0FBVzRCLEVBQUU7UUFDdkI7SUFFSjtJQUVBLE1BQU1DLFFBQVFqQixPQUFPUSxJQUFJLENBQUNKLE1BQU0sR0FBR0osT0FBT0csTUFBTSxDQUFDQyxNQUFNO0lBRXZELE1BQU1DLFVBQVVYLElBQUlZLENBQUMsQ0FBQyw2QkFBNkI7UUFDakRDLE9BQU9QLE9BQU9HLE1BQU0sQ0FBQ0MsTUFBTTtRQUMzQkssT0FBT3RCLGVBQWVNLFdBQVdpQixNQUFNLENBQUNDLE1BQU0sQ0FBQ00sUUFBUSxJQUFJLFdBQVcsV0FBVyxFQUFFdkIsSUFBSWtCLElBQUk7UUFDM0ZLO0lBQ0Y7SUFFQSxPQUFPSixTQUFTQyxJQUFJLENBQ2xCO1FBQ0UsR0FBR2QsTUFBTTtRQUNUSztJQUNGLEdBQ0E7UUFDRVUsUUFBUTNCLFdBQVc4QixXQUFXO0lBQ2hDO0FBRUosRUFBQyJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deleteByID.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/collections/deleteByID.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"deleteByID.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/collections/deleteByID.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAA;AAEjE,eAAO,MAAM,UAAU,EAAE,4BA8BxB,CAAA"}
|
|
@@ -1,43 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
})
|
|
5
|
-
Object.defineProperty(exports, "deleteByID", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return deleteByID;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _httpstatus = /*#__PURE__*/ _interop_require_default(require("http-status"));
|
|
12
|
-
const _operations = require("payload/operations");
|
|
13
|
-
const _utilities = require("payload/utilities");
|
|
14
|
-
function _interop_require_default(obj) {
|
|
15
|
-
return obj && obj.__esModule ? obj : {
|
|
16
|
-
default: obj
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
const deleteByID = async ({ id, collection, req })=>{
|
|
1
|
+
import httpStatus from 'http-status';
|
|
2
|
+
import { deleteByIDOperation } from 'payload/operations';
|
|
3
|
+
import { isNumber } from 'payload/utilities';
|
|
4
|
+
export const deleteByID = async ({ id, collection, req })=>{
|
|
20
5
|
const { searchParams } = req;
|
|
21
6
|
const depth = searchParams.get('depth');
|
|
22
|
-
const doc = await
|
|
7
|
+
const doc = await deleteByIDOperation({
|
|
23
8
|
id,
|
|
24
9
|
collection,
|
|
25
|
-
depth:
|
|
10
|
+
depth: isNumber(depth) ? depth : undefined,
|
|
26
11
|
req
|
|
27
12
|
});
|
|
28
13
|
if (!doc) {
|
|
29
14
|
return Response.json({
|
|
30
15
|
message: req.t('general:notFound')
|
|
31
16
|
}, {
|
|
32
|
-
status:
|
|
17
|
+
status: httpStatus.NOT_FOUND
|
|
33
18
|
});
|
|
34
19
|
}
|
|
35
20
|
return Response.json({
|
|
36
21
|
doc,
|
|
37
22
|
message: req.t('general:deletedSuccessfully')
|
|
38
23
|
}, {
|
|
39
|
-
status:
|
|
24
|
+
status: httpStatus.OK
|
|
40
25
|
});
|
|
41
26
|
};
|
|
42
27
|
|
|
43
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
28
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9yb3V0ZXMvcmVzdC9jb2xsZWN0aW9ucy9kZ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O1FBQ0VDLFFBQVFoQixXQUFXa0IsRUFBRTtJQUN2QjtBQUVKLEVBQUMifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docAccess.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/collections/docAccess.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"docAccess.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/collections/docAccess.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAA;AAEjE,eAAO,MAAM,SAAS,EAAE,4BAUvB,CAAA"}
|
|
@@ -1,29 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "docAccess", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return docAccess;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _httpstatus = /*#__PURE__*/ _interop_require_default(require("http-status"));
|
|
12
|
-
const _operations = require("payload/operations");
|
|
13
|
-
function _interop_require_default(obj) {
|
|
14
|
-
return obj && obj.__esModule ? obj : {
|
|
15
|
-
default: obj
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
const docAccess = async ({ id, collection, req })=>{
|
|
19
|
-
const result = await (0, _operations.docAccessOperation)({
|
|
1
|
+
import httpStatus from 'http-status';
|
|
2
|
+
import { docAccessOperation } from 'payload/operations';
|
|
3
|
+
export const docAccess = async ({ id, collection, req })=>{
|
|
4
|
+
const result = await docAccessOperation({
|
|
20
5
|
id,
|
|
21
6
|
collection,
|
|
22
7
|
req
|
|
23
8
|
});
|
|
24
9
|
return Response.json(result, {
|
|
25
|
-
status:
|
|
10
|
+
status: httpStatus.OK
|
|
26
11
|
});
|
|
27
12
|
};
|
|
28
13
|
|
|
29
|
-
//# sourceMappingURL=data:application/json;base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UFHLEVBQUU7SUFDbkYsTUFBTUMsU0FBUyxNQUFNTCxtQkFBbUI7UUFDdENFO1FBQ0FDO1FBQ0FDO0lBQ0Y7SUFFQSxPQUFPRSxTQUFTQyxJQUFJLENBQUNGLFFBQVE7UUFDM0JHLFFBQVFULFdBQVdVLEVBQUU7SUFDdkI7QUFDRixFQUFDIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/collections/find.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/collections/find.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAE3D,eAAO,MAAM,IAAI,EAAE,sBA0BlB,CAAA"}
|
|
@@ -1,39 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return find;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _httpstatus = /*#__PURE__*/ _interop_require_default(require("http-status"));
|
|
12
|
-
const _operations = require("payload/operations");
|
|
13
|
-
const _utilities = require("payload/utilities");
|
|
14
|
-
const _qs = /*#__PURE__*/ _interop_require_default(require("qs"));
|
|
15
|
-
function _interop_require_default(obj) {
|
|
16
|
-
return obj && obj.__esModule ? obj : {
|
|
17
|
-
default: obj
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
const find = async ({ collection, req })=>{
|
|
1
|
+
import httpStatus from 'http-status';
|
|
2
|
+
import { findOperation } from 'payload/operations';
|
|
3
|
+
import { isNumber } from 'payload/utilities';
|
|
4
|
+
import qs from 'qs';
|
|
5
|
+
export const find = async ({ collection, req })=>{
|
|
21
6
|
const { searchParams } = req;
|
|
22
7
|
// parse using `qs` to handle `where` queries
|
|
23
|
-
const { depth, draft, limit, page, sort, where } =
|
|
24
|
-
const result = await
|
|
8
|
+
const { depth, draft, limit, page, sort, where } = qs.parse(searchParams.toString());
|
|
9
|
+
const result = await findOperation({
|
|
25
10
|
collection,
|
|
26
|
-
depth:
|
|
11
|
+
depth: isNumber(depth) ? Number(depth) : undefined,
|
|
27
12
|
draft: draft === 'true',
|
|
28
|
-
limit:
|
|
29
|
-
page:
|
|
13
|
+
limit: isNumber(limit) ? Number(limit) : undefined,
|
|
14
|
+
page: isNumber(page) ? Number(page) : undefined,
|
|
30
15
|
req,
|
|
31
16
|
sort,
|
|
32
17
|
where
|
|
33
18
|
});
|
|
34
19
|
return Response.json(result, {
|
|
35
|
-
status:
|
|
20
|
+
status: httpStatus.OK
|
|
36
21
|
});
|
|
37
22
|
};
|
|
38
23
|
|
|
39
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
24
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9yb3V0ZXMvcmVzdC9jb2xsZWN0aW9ucy9maW5kLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgV2hlcmUgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgaHR0cFN0YXR1cyBmcm9tICdodHRwLXN0YXR1cydcbmltcG9ydCB7IGZpbmRPcGVyYXRpb24gfSBmcm9tICdwYXlsb2FkL29wZXJhdGlvbnMnXG5pbXBvcnQgeyBpc051bWJlciB9IGZyb20gJ3BheWxvYWQvdXRpbGl0aWVzJ1xuaW1wb3J0IHFzIGZyb20gJ3FzJ1xuXG5pbXBvcnQgdHlwZSB7IENvbGxlY3Rpb25Sb3V0ZUhhbmRsZXIgfSBmcm9tICcuLi90eXBlcy5kLnRzJ1xuXG5leHBvcnQgY29uc3QgZmluZDogQ29sbGVjdGlvblJvdXRlSGFuZGxl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