@payloadcms/next 3.0.0-alpha.8 → 3.0.0-beta.1
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/cjs/withPayload.cjs +87 -0
- package/dist/cjs/withPayload.cjs.map +1 -0
- package/dist/config.js +2 -12
- package/dist/config.js.map +1 -0
- package/dist/elements/LeaveWithoutSaving/index.js +25 -76
- package/dist/elements/LeaveWithoutSaving/index.js.map +1 -0
- package/dist/elements/LeaveWithoutSaving/usePreventLeave.d.ts.map +1 -1
- package/dist/elements/LeaveWithoutSaving/usePreventLeave.js +11 -29
- package/dist/elements/LeaveWithoutSaving/usePreventLeave.js.map +1 -0
- package/dist/exports/layouts.d.ts +2 -0
- package/dist/exports/layouts.d.ts.map +1 -0
- package/dist/exports/layouts.js +3 -0
- package/dist/exports/layouts.js.map +1 -0
- package/dist/exports/routes.d.ts +3 -0
- package/dist/exports/routes.d.ts.map +1 -0
- package/dist/exports/routes.js +4 -0
- package/dist/exports/routes.js.map +1 -0
- package/dist/exports/utilities.d.ts +3 -0
- package/dist/exports/utilities.d.ts.map +1 -0
- package/dist/exports/utilities.js +4 -0
- package/dist/exports/utilities.js.map +1 -0
- package/dist/exports/views.d.ts +4 -0
- package/dist/exports/views.d.ts.map +1 -0
- package/dist/exports/views.js +5 -0
- package/dist/exports/views.js.map +1 -0
- package/dist/index.js +3 -35
- package/dist/index.js.map +1 -0
- package/dist/layouts/Root/index.d.ts.map +1 -1
- package/dist/layouts/Root/index.js +62 -77
- package/dist/layouts/Root/index.js.map +1 -0
- 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/fileFactory.js.map +1 -0
- 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/handlers.js.map +1 -0
- package/dist/next-fileupload/index.d.ts +1 -1
- package/dist/next-fileupload/index.js +10 -25
- package/dist/next-fileupload/index.js.map +1 -0
- package/dist/next-fileupload/isEligibleRequest.js +2 -12
- package/dist/next-fileupload/isEligibleRequest.js.map +1 -0
- 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/processMultipart.js.map +1 -0
- package/dist/next-fileupload/processNested.js +4 -14
- package/dist/next-fileupload/processNested.js.map +1 -0
- package/dist/next-fileupload/uploadTimer.js +2 -12
- package/dist/next-fileupload/uploadTimer.js.map +1 -0
- 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-fileupload/utilities.js.map +1 -0
- 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/next-stream-file/index.js.map +1 -0
- package/dist/prod/payload/favicon.svg +15 -0
- package/dist/prod/payload/og-image.png +0 -0
- package/dist/prod/styles.css +1 -0
- package/dist/routes/graphql/handler.d.ts.map +1 -1
- package/dist/routes/graphql/handler.js +19 -36
- package/dist/routes/graphql/handler.js.map +1 -0
- 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/index.js.map +1 -0
- package/dist/routes/graphql/playground.js +6 -16
- package/dist/routes/graphql/playground.js.map +1 -0
- package/dist/routes/index.d.ts +2 -3
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/index.js +3 -37
- package/dist/routes/index.js.map +1 -0
- 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/access.js.map +1 -0
- 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/forgotPassword.js.map +1 -0
- 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/init.js.map +1 -0
- 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/login.js.map +1 -0
- 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/logout.js.map +1 -0
- 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/me.js.map +1 -0
- 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/refresh.js.map +1 -0
- 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 +12 -25
- package/dist/routes/rest/auth/registerFirstUser.js.map +1 -0
- 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/resetPassword.js.map +1 -0
- 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/unlock.js.map +1 -0
- 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/auth/verifyEmail.js.map +1 -0
- package/dist/routes/rest/buildFormState.d.ts +3 -3
- package/dist/routes/rest/buildFormState.d.ts.map +1 -1
- package/dist/routes/rest/buildFormState.js +143 -79
- package/dist/routes/rest/buildFormState.js.map +1 -0
- package/dist/routes/rest/checkEndpoints.d.ts.map +1 -1
- package/dist/routes/rest/checkEndpoints.js +4 -19
- package/dist/routes/rest/checkEndpoints.js.map +1 -0
- 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 +10 -24
- package/dist/routes/rest/collections/create.js.map +1 -0
- 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 +13 -31
- package/dist/routes/rest/collections/delete.js.map +1 -0
- 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/deleteByID.js.map +1 -0
- 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/docAccess.js.map +1 -0
- package/dist/routes/rest/collections/duplicate.d.ts +3 -0
- package/dist/routes/rest/collections/duplicate.d.ts.map +1 -0
- package/dist/routes/rest/collections/duplicate.js +28 -0
- package/dist/routes/rest/collections/duplicate.js.map +1 -0
- 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 +11 -29
- package/dist/routes/rest/collections/find.js.map +1 -0
- 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/findByID.js.map +1 -0
- 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/findVersionByID.js.map +1 -0
- 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 +11 -29
- package/dist/routes/rest/collections/findVersions.js.map +1 -0
- package/dist/routes/rest/collections/preview.d.ts +3 -0
- package/dist/routes/rest/collections/preview.d.ts.map +1 -0
- package/dist/routes/rest/collections/preview.js +36 -0
- package/dist/routes/rest/collections/preview.js.map +1 -0
- 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/restoreVersion.js.map +1 -0
- 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 +13 -31
- package/dist/routes/rest/collections/update.js.map +1 -0
- 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/collections/updateByID.js.map +1 -0
- package/dist/routes/rest/files/checkFileAccess.d.ts +7 -0
- package/dist/routes/rest/files/checkFileAccess.d.ts.map +1 -0
- package/dist/routes/rest/files/checkFileAccess.js +50 -0
- package/dist/routes/rest/files/checkFileAccess.js.map +1 -0
- package/dist/routes/rest/files/getFile.d.ts +9 -0
- package/dist/routes/rest/files/getFile.d.ts.map +1 -0
- package/dist/routes/rest/files/getFile.js +52 -0
- package/dist/routes/rest/files/getFile.js.map +1 -0
- 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/docAccess.js.map +1 -0
- 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 +10 -25
- package/dist/routes/rest/globals/findOne.js.map +1 -0
- 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/findVersionByID.js.map +1 -0
- 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 +11 -29
- package/dist/routes/rest/globals/findVersions.js.map +1 -0
- package/dist/routes/rest/globals/preview.d.ts +3 -0
- package/dist/routes/rest/globals/preview.d.ts.map +1 -0
- package/dist/routes/rest/globals/preview.js +35 -0
- package/dist/routes/rest/globals/preview.js.map +1 -0
- 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/restoreVersion.js.map +1 -0
- 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 +10 -25
- package/dist/routes/rest/globals/update.js.map +1 -0
- package/dist/routes/rest/index.d.ts.map +1 -1
- package/dist/routes/rest/index.js +129 -122
- package/dist/routes/rest/index.js.map +1 -0
- package/dist/routes/rest/{RouteError.d.ts → routeError.d.ts} +3 -3
- package/dist/routes/rest/routeError.d.ts.map +1 -0
- package/dist/routes/rest/routeError.js +93 -0
- package/dist/routes/rest/routeError.js.map +1 -0
- package/dist/routes/rest/types.js +2 -5
- package/dist/routes/rest/types.js.map +1 -0
- package/dist/scss/app.scss +2 -2
- package/dist/utilities/buildFieldSchemaMap/index.d.ts +4 -0
- package/dist/utilities/buildFieldSchemaMap/index.d.ts.map +1 -0
- package/dist/utilities/buildFieldSchemaMap/index.js +28 -0
- package/dist/utilities/buildFieldSchemaMap/index.js.map +1 -0
- package/dist/utilities/buildFieldSchemaMap/traverseFields.d.ts +14 -0
- package/dist/utilities/buildFieldSchemaMap/traverseFields.d.ts.map +1 -0
- package/dist/utilities/buildFieldSchemaMap/traverseFields.js +72 -0
- package/dist/utilities/buildFieldSchemaMap/traverseFields.js.map +1 -0
- package/dist/utilities/buildFieldSchemaMap/types.d.ts +3 -0
- package/dist/utilities/buildFieldSchemaMap/types.d.ts.map +1 -0
- package/dist/utilities/buildFieldSchemaMap/types.js +3 -0
- package/dist/utilities/buildFieldSchemaMap/types.js.map +1 -0
- package/dist/utilities/createPayloadRequest.d.ts.map +1 -1
- package/dist/utilities/createPayloadRequest.js +29 -32
- package/dist/utilities/createPayloadRequest.js.map +1 -0
- package/dist/utilities/getDataAndFile.js +6 -16
- package/dist/utilities/getDataAndFile.js.map +1 -0
- package/dist/utilities/getNextRequestI18n.d.ts +11 -0
- package/dist/utilities/getNextRequestI18n.d.ts.map +1 -0
- package/dist/utilities/getNextRequestI18n.js +18 -0
- package/dist/utilities/getNextRequestI18n.js.map +1 -0
- package/dist/utilities/getPayloadHMR.d.ts +4 -0
- package/dist/utilities/getPayloadHMR.d.ts.map +1 -0
- package/dist/utilities/getPayloadHMR.js +75 -0
- package/dist/utilities/getPayloadHMR.js.map +1 -0
- package/dist/utilities/getRequestLanguage.d.ts +6 -3
- package/dist/utilities/getRequestLanguage.d.ts.map +1 -1
- package/dist/utilities/getRequestLanguage.js +14 -16
- package/dist/utilities/getRequestLanguage.js.map +1 -0
- package/dist/utilities/getRequestLocales.js +2 -12
- package/dist/utilities/getRequestLocales.js.map +1 -0
- package/dist/utilities/initPage.d.ts +4 -16
- package/dist/utilities/initPage.d.ts.map +1 -1
- package/dist/utilities/initPage.js +70 -54
- package/dist/utilities/initPage.js.map +1 -0
- package/dist/utilities/meta.js +5 -15
- package/dist/utilities/meta.js.map +1 -0
- 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/utilities/timestamp.js.map +1 -0
- package/dist/views/API/RenderJSON/index.js +17 -69
- package/dist/views/API/RenderJSON/index.js.map +1 -0
- package/dist/views/API/index.client.d.ts +1 -2
- package/dist/views/API/index.client.d.ts.map +1 -1
- package/dist/views/API/index.client.js +58 -106
- package/dist/views/API/index.client.js.map +1 -0
- package/dist/views/API/index.d.ts +2 -3
- package/dist/views/API/index.d.ts.map +1 -1
- package/dist/views/API/index.js +5 -25
- package/dist/views/API/index.js.map +1 -0
- package/dist/views/API/meta.d.ts +1 -1
- package/dist/views/API/meta.d.ts.map +1 -1
- package/dist/views/API/meta.js +4 -14
- package/dist/views/API/meta.js.map +1 -0
- package/dist/views/Account/Settings/index.d.ts.map +1 -1
- package/dist/views/Account/Settings/index.js +16 -30
- package/dist/views/Account/Settings/index.js.map +1 -0
- package/dist/views/Account/ToggleTheme/index.js +10 -59
- package/dist/views/Account/ToggleTheme/index.js.map +1 -0
- package/dist/views/Account/index.d.ts +3 -12
- package/dist/views/Account/index.d.ts.map +1 -1
- package/dist/views/Account/index.js +43 -152
- package/dist/views/Account/index.js.map +1 -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/Account/meta.js.map +1 -0
- package/dist/views/CreateFirstUser/index.client.d.ts +2 -0
- package/dist/views/CreateFirstUser/index.client.d.ts.map +1 -1
- package/dist/views/CreateFirstUser/index.client.js +15 -22
- package/dist/views/CreateFirstUser/index.client.js.map +1 -0
- package/dist/views/CreateFirstUser/index.d.ts +3 -17
- package/dist/views/CreateFirstUser/index.d.ts.map +1 -1
- package/dist/views/CreateFirstUser/index.js +23 -64
- package/dist/views/CreateFirstUser/index.js.map +1 -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/views/CreateFirstUser/meta.js.map +1 -0
- package/dist/views/Dashboard/Default/index.client.d.ts +4 -2
- package/dist/views/Dashboard/Default/index.client.d.ts.map +1 -1
- package/dist/views/Dashboard/Default/index.client.js +35 -82
- package/dist/views/Dashboard/Default/index.client.js.map +1 -0
- package/dist/views/Dashboard/Default/index.d.ts +4 -3
- package/dist/views/Dashboard/Default/index.d.ts.map +1 -1
- package/dist/views/Dashboard/Default/index.js +17 -31
- package/dist/views/Dashboard/Default/index.js.map +1 -0
- package/dist/views/Dashboard/index.d.ts +3 -14
- package/dist/views/Dashboard/index.d.ts.map +1 -1
- package/dist/views/Dashboard/index.js +18 -113
- package/dist/views/Dashboard/index.js.map +1 -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/views/Dashboard/meta.js.map +1 -0
- package/dist/views/Document/getCustomViewByKey.d.ts +2 -2
- package/dist/views/Document/getCustomViewByKey.d.ts.map +1 -1
- package/dist/views/Document/getCustomViewByKey.js +2 -12
- package/dist/views/Document/getCustomViewByKey.js.map +1 -0
- package/dist/views/Document/getCustomViewByRoute.d.ts +8 -0
- package/dist/views/Document/getCustomViewByRoute.d.ts.map +1 -0
- package/dist/views/Document/getCustomViewByRoute.js +22 -0
- package/dist/views/Document/getCustomViewByRoute.js.map +1 -0
- package/dist/views/Document/getMetaBySegment.d.ts +6 -16
- package/dist/views/Document/getMetaBySegment.d.ts.map +1 -1
- package/dist/views/Document/getMetaBySegment.js +39 -86
- package/dist/views/Document/getMetaBySegment.js.map +1 -0
- package/dist/views/Document/getViewsFromConfig.d.ts +12 -9
- package/dist/views/Document/getViewsFromConfig.d.ts.map +1 -1
- package/dist/views/Document/getViewsFromConfig.js +198 -121
- package/dist/views/Document/getViewsFromConfig.js.map +1 -0
- package/dist/views/Document/index.d.ts +4 -22
- package/dist/views/Document/index.d.ts.map +1 -1
- package/dist/views/Document/index.js +115 -192
- package/dist/views/Document/index.js.map +1 -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/views/Document/meta.js.map +1 -0
- package/dist/views/Edit/Default/Auth/APIKey.d.ts +1 -2
- package/dist/views/Edit/Default/Auth/APIKey.d.ts.map +1 -1
- package/dist/views/Edit/Default/Auth/APIKey.js +37 -78
- package/dist/views/Edit/Default/Auth/APIKey.js.map +1 -0
- package/dist/views/Edit/Default/Auth/index.d.ts +2 -3
- package/dist/views/Edit/Default/Auth/index.d.ts.map +1 -1
- package/dist/views/Edit/Default/Auth/index.js +42 -93
- package/dist/views/Edit/Default/Auth/index.js.map +1 -0
- package/dist/views/Edit/Default/Auth/types.js +2 -5
- package/dist/views/Edit/Default/Auth/types.js.map +1 -0
- package/dist/views/Edit/Default/SetDocumentTitle/index.d.ts +5 -4
- package/dist/views/Edit/Default/SetDocumentTitle/index.d.ts.map +1 -1
- package/dist/views/Edit/Default/SetDocumentTitle/index.js +27 -39
- package/dist/views/Edit/Default/SetDocumentTitle/index.js.map +1 -0
- package/dist/views/Edit/Default/SetStepNav/index.d.ts +1 -2
- package/dist/views/Edit/Default/SetStepNav/index.d.ts.map +1 -1
- package/dist/views/Edit/Default/SetStepNav/index.js +17 -23
- package/dist/views/Edit/Default/SetStepNav/index.js.map +1 -0
- package/dist/views/Edit/Default/index.d.ts.map +1 -1
- package/dist/views/Edit/Default/index.js +109 -109
- package/dist/views/Edit/Default/index.js.map +1 -0
- package/dist/views/Edit/Default/types.js +2 -5
- package/dist/views/Edit/Default/types.js.map +1 -0
- package/dist/views/Edit/index.client.d.ts +1 -2
- package/dist/views/Edit/index.client.d.ts.map +1 -1
- package/dist/views/Edit/index.client.js +11 -94
- package/dist/views/Edit/index.client.js.map +1 -0
- package/dist/views/Edit/index.d.ts +2 -3
- package/dist/views/Edit/index.d.ts.map +1 -1
- package/dist/views/Edit/index.js +5 -25
- package/dist/views/Edit/index.js.map +1 -0
- package/dist/views/Edit/meta.d.ts +1 -1
- package/dist/views/Edit/meta.d.ts.map +1 -1
- package/dist/views/Edit/meta.js +11 -21
- package/dist/views/Edit/meta.js.map +1 -0
- package/dist/views/Edit/sanitizeEditViewProps.d.ts +1 -2
- package/dist/views/Edit/sanitizeEditViewProps.d.ts.map +1 -1
- package/dist/views/Edit/sanitizeEditViewProps.js +5 -18
- package/dist/views/Edit/sanitizeEditViewProps.js.map +1 -0
- package/dist/views/ForgotPassword/index.d.ts +4 -12
- package/dist/views/ForgotPassword/index.d.ts.map +1 -1
- package/dist/views/ForgotPassword/index.js +27 -91
- package/dist/views/ForgotPassword/index.js.map +1 -0
- package/dist/views/ForgotPassword/meta.d.ts +3 -0
- package/dist/views/ForgotPassword/meta.d.ts.map +1 -0
- package/dist/views/ForgotPassword/meta.js +11 -0
- package/dist/views/ForgotPassword/meta.js.map +1 -0
- package/dist/views/List/Default/index.d.ts.map +1 -1
- package/dist/views/List/Default/index.js +80 -109
- package/dist/views/List/Default/index.js.map +1 -0
- package/dist/views/List/Default/types.d.ts +3 -2
- package/dist/views/List/Default/types.d.ts.map +1 -1
- package/dist/views/List/Default/types.js +2 -5
- package/dist/views/List/Default/types.js.map +1 -0
- package/dist/views/List/index.d.ts +3 -20
- package/dist/views/List/index.d.ts.map +1 -1
- package/dist/views/List/index.js +69 -114
- package/dist/views/List/index.js.map +1 -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/views/List/meta.js.map +1 -0
- package/dist/views/LivePreview/Context/collisionDetection.js +6 -14
- package/dist/views/LivePreview/Context/collisionDetection.js.map +1 -0
- package/dist/views/LivePreview/Context/context.d.ts +2 -2
- package/dist/views/LivePreview/Context/context.d.ts.map +1 -1
- package/dist/views/LivePreview/Context/context.js +4 -22
- package/dist/views/LivePreview/Context/context.js.map +1 -0
- package/dist/views/LivePreview/Context/index.d.ts +5 -3
- package/dist/views/LivePreview/Context/index.d.ts.map +1 -1
- package/dist/views/LivePreview/Context/index.js +38 -93
- package/dist/views/LivePreview/Context/index.js.map +1 -0
- package/dist/views/LivePreview/Context/sizeReducer.js +2 -12
- package/dist/views/LivePreview/Context/sizeReducer.js.map +1 -0
- package/dist/views/LivePreview/Device/index.js +10 -61
- package/dist/views/LivePreview/Device/index.js.map +1 -0
- package/dist/views/LivePreview/DeviceContainer/index.js +6 -21
- package/dist/views/LivePreview/DeviceContainer/index.js.map +1 -0
- package/dist/views/LivePreview/IFrame/index.d.ts +4 -3
- package/dist/views/LivePreview/IFrame/index.d.ts.map +1 -1
- package/dist/views/LivePreview/IFrame/index.js +6 -58
- package/dist/views/LivePreview/IFrame/index.js.map +1 -0
- package/dist/views/LivePreview/Preview/index.d.ts +1 -1
- package/dist/views/LivePreview/Preview/index.d.ts.map +1 -1
- package/dist/views/LivePreview/Preview/index.js +23 -72
- package/dist/views/LivePreview/Preview/index.js.map +1 -0
- package/dist/views/LivePreview/Toolbar/Controls/index.d.ts +1 -1
- package/dist/views/LivePreview/Toolbar/Controls/index.d.ts.map +1 -1
- package/dist/views/LivePreview/Toolbar/Controls/index.js +24 -37
- package/dist/views/LivePreview/Toolbar/Controls/index.js.map +1 -0
- package/dist/views/LivePreview/Toolbar/SizeInput/index.js +9 -61
- package/dist/views/LivePreview/Toolbar/SizeInput/index.js.map +1 -0
- package/dist/views/LivePreview/Toolbar/index.d.ts +1 -1
- package/dist/views/LivePreview/Toolbar/index.d.ts.map +1 -1
- package/dist/views/LivePreview/Toolbar/index.js +16 -32
- package/dist/views/LivePreview/Toolbar/index.js.map +1 -0
- package/dist/views/LivePreview/ToolbarArea/index.js +6 -22
- package/dist/views/LivePreview/ToolbarArea/index.js.map +1 -0
- package/dist/views/LivePreview/index.client.d.ts +2 -3
- package/dist/views/LivePreview/index.client.d.ts.map +1 -1
- package/dist/views/LivePreview/index.client.js +83 -106
- package/dist/views/LivePreview/index.client.js.map +1 -0
- package/dist/views/LivePreview/index.d.ts +2 -2
- package/dist/views/LivePreview/index.d.ts.map +1 -1
- package/dist/views/LivePreview/index.js +34 -30
- package/dist/views/LivePreview/index.js.map +1 -0
- package/dist/views/LivePreview/meta.d.ts +1 -1
- package/dist/views/LivePreview/meta.d.ts.map +1 -1
- package/dist/views/LivePreview/meta.js +11 -21
- package/dist/views/LivePreview/meta.js.map +1 -0
- package/dist/views/LivePreview/usePopupWindow.d.ts.map +1 -1
- package/dist/views/LivePreview/usePopupWindow.js +11 -21
- package/dist/views/LivePreview/usePopupWindow.js.map +1 -0
- package/dist/views/Login/LoginForm/index.d.ts.map +1 -1
- package/dist/views/Login/LoginForm/index.js +22 -36
- package/dist/views/Login/LoginForm/index.js.map +1 -0
- package/dist/views/Login/index.d.ts +4 -15
- package/dist/views/Login/index.d.ts.map +1 -1
- package/dist/views/Login/index.js +16 -88
- package/dist/views/Login/index.js.map +1 -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/Login/meta.js.map +1 -0
- package/dist/views/Logout/LogoutClient.d.ts.map +1 -1
- package/dist/views/Logout/LogoutClient.js +15 -69
- package/dist/views/Logout/LogoutClient.js.map +1 -0
- package/dist/views/Logout/index.d.ts +5 -17
- package/dist/views/Logout/index.d.ts.map +1 -1
- package/dist/views/Logout/index.js +12 -53
- package/dist/views/Logout/index.js.map +1 -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/Logout/meta.js.map +1 -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 +41 -0
- package/dist/views/NotFound/index.client.js.map +1 -0
- package/dist/views/NotFound/index.d.ts +26 -5
- package/dist/views/NotFound/index.d.ts.map +1 -1
- package/dist/views/NotFound/index.js +34 -45
- package/dist/views/NotFound/index.js.map +1 -0
- package/dist/views/NotFound/index.scss +1 -0
- package/dist/views/NotFound/meta.d.ts +8 -0
- package/dist/views/NotFound/meta.d.ts.map +1 -0
- package/dist/views/NotFound/meta.js +11 -0
- package/dist/views/NotFound/meta.js.map +1 -0
- package/dist/views/ResetPassword/index.d.ts +4 -17
- package/dist/views/ResetPassword/index.d.ts.map +1 -1
- package/dist/views/ResetPassword/index.js +34 -62
- package/dist/views/ResetPassword/index.js.map +1 -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/ResetPassword/meta.js.map +1 -0
- package/dist/views/Root/getCustomViewByRoute.d.ts +6 -0
- package/dist/views/Root/getCustomViewByRoute.d.ts.map +1 -0
- package/dist/views/Root/getCustomViewByRoute.js +19 -0
- package/dist/views/Root/getCustomViewByRoute.js.map +1 -0
- package/dist/views/Root/getViewFromConfig.d.ts +18 -0
- package/dist/views/Root/getViewFromConfig.d.ts.map +1 -0
- package/dist/views/Root/getViewFromConfig.js +138 -0
- package/dist/views/Root/getViewFromConfig.js.map +1 -0
- package/dist/views/Root/index.d.ts +13 -6
- package/dist/views/Root/index.d.ts.map +1 -1
- package/dist/views/Root/index.js +43 -226
- package/dist/views/Root/index.js.map +1 -0
- package/dist/views/Root/isPathMatchingRoute.d.ts +8 -0
- package/dist/views/Root/isPathMatchingRoute.d.ts.map +1 -0
- package/dist/views/Root/isPathMatchingRoute.js +16 -0
- package/dist/views/Root/isPathMatchingRoute.js.map +1 -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/Root/meta.js.map +1 -0
- package/dist/views/Unauthorized/index.d.ts +4 -11
- package/dist/views/Unauthorized/index.d.ts.map +1 -1
- package/dist/views/Unauthorized/index.js +18 -42
- package/dist/views/Unauthorized/index.js.map +1 -0
- package/dist/views/Unauthorized/index.scss +36 -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/Unauthorized/meta.js.map +1 -0
- package/dist/views/Verify/index.d.ts +4 -17
- package/dist/views/Verify/index.d.ts.map +1 -1
- package/dist/views/Verify/index.js +14 -55
- package/dist/views/Verify/index.js.map +1 -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/views/Verify/meta.js.map +1 -0
- package/dist/views/Version/Default/SetStepNav.d.ts +4 -3
- package/dist/views/Version/Default/SetStepNav.d.ts.map +1 -1
- package/dist/views/Version/Default/SetStepNav.js +36 -28
- package/dist/views/Version/Default/SetStepNav.js.map +1 -0
- package/dist/views/Version/Default/index.d.ts +1 -1
- package/dist/views/Version/Default/index.d.ts.map +1 -1
- package/dist/views/Version/Default/index.js +53 -93
- package/dist/views/Version/Default/index.js.map +1 -0
- package/dist/views/Version/Default/types.d.ts +4 -9
- package/dist/views/Version/Default/types.d.ts.map +1 -1
- package/dist/views/Version/Default/types.js +2 -5
- package/dist/views/Version/Default/types.js.map +1 -0
- package/dist/views/Version/RenderFieldsToDiff/Label/index.js +4 -20
- package/dist/views/Version/RenderFieldsToDiff/Label/index.js.map +1 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.d.ts +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.js +31 -47
- package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.js.map +1 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/Nested/index.d.ts +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Nested/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Nested/index.js +10 -26
- package/dist/views/Version/RenderFieldsToDiff/fields/Nested/index.js.map +1 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.d.ts +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.js +20 -35
- package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.js.map +1 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/DiffViewer/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/DiffViewer/index.js +7 -62
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/DiffViewer/index.js.map +1 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.d.ts +6 -2
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.js +16 -31
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.js.map +1 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.d.ts +6 -2
- package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.js +11 -26
- package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.js.map +1 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/Text/DiffViewer/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Text/DiffViewer/index.js +7 -62
- package/dist/views/Version/RenderFieldsToDiff/fields/Text/DiffViewer/index.js.map +1 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.d.ts +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.js +11 -27
- package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.js.map +1 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/diffMethods.js +2 -12
- package/dist/views/Version/RenderFieldsToDiff/fields/diffMethods.js.map +1 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/index.d.ts +54 -19
- package/dist/views/Version/RenderFieldsToDiff/fields/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/index.js +25 -40
- package/dist/views/Version/RenderFieldsToDiff/fields/index.js.map +1 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/styles.js +2 -12
- package/dist/views/Version/RenderFieldsToDiff/fields/styles.js.map +1 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/types.d.ts +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/types.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/types.js +2 -5
- package/dist/views/Version/RenderFieldsToDiff/fields/types.js.map +1 -0
- package/dist/views/Version/RenderFieldsToDiff/index.d.ts +1 -1
- package/dist/views/Version/RenderFieldsToDiff/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/index.js +28 -43
- package/dist/views/Version/RenderFieldsToDiff/index.js.map +1 -0
- package/dist/views/Version/RenderFieldsToDiff/types.d.ts +2 -2
- package/dist/views/Version/RenderFieldsToDiff/types.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/types.js +2 -5
- package/dist/views/Version/RenderFieldsToDiff/types.js.map +1 -0
- package/dist/views/Version/Restore/index.d.ts +1 -1
- package/dist/views/Version/Restore/index.d.ts.map +1 -1
- package/dist/views/Version/Restore/index.js +24 -71
- package/dist/views/Version/Restore/index.js.map +1 -0
- package/dist/views/Version/Restore/types.d.ts +1 -1
- package/dist/views/Version/Restore/types.d.ts.map +1 -1
- package/dist/views/Version/Restore/types.js +2 -5
- package/dist/views/Version/Restore/types.js.map +1 -0
- package/dist/views/Version/SelectComparison/index.d.ts +1 -1
- package/dist/views/Version/SelectComparison/index.d.ts.map +1 -1
- package/dist/views/Version/SelectComparison/index.js +53 -90
- package/dist/views/Version/SelectComparison/index.js.map +1 -0
- package/dist/views/Version/SelectComparison/types.d.ts +1 -1
- package/dist/views/Version/SelectComparison/types.d.ts.map +1 -1
- package/dist/views/Version/SelectComparison/types.js +2 -5
- package/dist/views/Version/SelectComparison/types.js.map +1 -0
- package/dist/views/Version/SelectLocales/index.d.ts +1 -1
- package/dist/views/Version/SelectLocales/index.d.ts.map +1 -1
- package/dist/views/Version/SelectLocales/index.js +11 -25
- package/dist/views/Version/SelectLocales/index.js.map +1 -0
- package/dist/views/Version/SelectLocales/types.d.ts +4 -4
- package/dist/views/Version/SelectLocales/types.d.ts.map +1 -1
- package/dist/views/Version/SelectLocales/types.js +2 -5
- package/dist/views/Version/SelectLocales/types.js.map +1 -0
- package/dist/views/Version/index.d.ts +2 -2
- package/dist/views/Version/index.d.ts.map +1 -1
- package/dist/views/Version/index.js +35 -42
- package/dist/views/Version/index.js.map +1 -0
- package/dist/views/Version/meta.d.ts +1 -1
- package/dist/views/Version/meta.d.ts.map +1 -1
- package/dist/views/Version/meta.js +13 -19
- package/dist/views/Version/meta.js.map +1 -0
- package/dist/views/Version/shared.js +3 -21
- package/dist/views/Version/shared.js.map +1 -0
- package/dist/views/Versions/buildColumns.d.ts +2 -2
- package/dist/views/Versions/buildColumns.d.ts.map +1 -1
- package/dist/views/Versions/buildColumns.js +36 -42
- package/dist/views/Versions/buildColumns.js.map +1 -0
- package/dist/views/Versions/cells/AutosaveCell/index.d.ts.map +1 -1
- package/dist/views/Versions/cells/AutosaveCell/index.js +10 -59
- package/dist/views/Versions/cells/AutosaveCell/index.js.map +1 -0
- package/dist/views/Versions/cells/CreatedAt/index.d.ts.map +1 -1
- package/dist/views/Versions/cells/CreatedAt/index.js +18 -25
- package/dist/views/Versions/cells/CreatedAt/index.js.map +1 -0
- package/dist/views/Versions/cells/ID/index.js +6 -57
- package/dist/views/Versions/cells/ID/index.js.map +1 -0
- package/dist/views/Versions/index.client.d.ts +1 -6
- package/dist/views/Versions/index.client.d.ts.map +1 -1
- package/dist/views/Versions/index.client.js +31 -117
- package/dist/views/Versions/index.client.js.map +1 -0
- package/dist/views/Versions/index.d.ts +2 -3
- package/dist/views/Versions/index.d.ts.map +1 -1
- package/dist/views/Versions/index.js +40 -72
- package/dist/views/Versions/index.js.map +1 -0
- package/dist/views/Versions/meta.d.ts +1 -1
- package/dist/views/Versions/meta.d.ts.map +1 -1
- package/dist/views/Versions/meta.js +7 -17
- package/dist/views/Versions/meta.js.map +1 -0
- package/dist/views/Versions/types.js +2 -5
- package/dist/views/Versions/types.js.map +1 -0
- package/dist/webpackEntry.d.ts +5 -0
- package/dist/webpackEntry.d.ts.map +1 -0
- package/dist/webpackEntry.js +6 -0
- package/dist/webpackEntry.js.map +1 -0
- package/dist/withPayload.d.ts +7 -2
- package/dist/withPayload.d.ts.map +1 -1
- package/dist/withPayload.js +7 -8
- package/dist/withPayload.js.map +1 -0
- package/package.json +38 -53
- package/src/index.js +1 -0
- package/dist/295bdb5117ce718dc7ce.woff2 +0 -1
- package/dist/3dec23c585a4abb5db73.woff +0 -1
- package/dist/542802f243f0fcaf55b3.woff2 +0 -1
- package/dist/5e5b3593b8911609ead8.woff +0 -1
- package/dist/64ee2a3127da82b7ea68.woff2 +0 -1
- package/dist/67a3a8f8301a0429df2d.woff +0 -1
- package/dist/8d0dc94a123c04b123f0.woff +0 -1
- package/dist/94db87589768ca1eec3c.woff2 +0 -1
- package/dist/997a8ea7da8ec3068210.woff2 +0 -1
- package/dist/9ab00e972f6f94ca3ff4.woff +0 -1
- package/dist/ab1f8b95d9d1911a4a3e.woff +0 -1
- package/dist/ba5a15d71add74a81bb9.woff +0 -1
- package/dist/bd2c036744af4b004ea6.woff2 +0 -1
- package/dist/bin/index.d.ts +0 -2
- package/dist/bin/index.d.ts.map +0 -1
- package/dist/bin/index.js +0 -37
- package/dist/bin/install.d.ts +0 -4
- package/dist/bin/install.d.ts.map +0 -1
- package/dist/bin/install.js +0 -77
- package/dist/cc56c782af93204aba75.woff +0 -1
- package/dist/d377d6e20b542fe3b375.woff2 +0 -1
- package/dist/e415ace668b22ac52c65.woff2 +0 -1
- package/dist/exports/index.d.ts +0 -2
- package/dist/exports/index.d.ts.map +0 -1
- package/dist/exports/index.js +0 -13
- package/dist/graphql/registerSchema.d.ts +0 -2
- package/dist/graphql/registerSchema.d.ts.map +0 -1
- package/dist/graphql/registerSchema.js +0 -3
- package/dist/index.d.ts +0 -7
- package/dist/index.d.ts.map +0 -1
- package/dist/layouts/Admin/index.d.ts +0 -12
- package/dist/layouts/Admin/index.d.ts.map +0 -1
- package/dist/layouts/Admin/index.js +0 -44
- 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/routes/rest/RouteError.d.ts.map +0 -1
- package/dist/routes/rest/RouteError.js +0 -104
- package/dist/routes/rest/[collection]/file/[filename]/route.d.ts +0 -8
- package/dist/routes/rest/[collection]/file/[filename]/route.d.ts.map +0 -1
- package/dist/routes/rest/[collection]/file/[filename]/route.js +0 -116
- package/dist/styles.css +0 -1
- package/dist/utilities/auth.d.ts +0 -10
- package/dist/utilities/auth.d.ts.map +0 -1
- package/dist/utilities/auth.js +0 -42
- 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/utilities/getNextI18n.d.ts +0 -7
- package/dist/utilities/getNextI18n.d.ts.map +0 -1
- package/dist/utilities/getNextI18n.js +0 -28
- package/dist/utilities/getNextT.d.ts +0 -7
- package/dist/utilities/getNextT.d.ts.map +0 -1
- package/dist/utilities/getNextT.js +0 -28
- package/dist/views/Document/getCustomViewByPath.d.ts +0 -4
- package/dist/views/Document/getCustomViewByPath.d.ts.map +0 -1
- package/dist/views/Document/getCustomViewByPath.js +0 -26
- package/dist/views/Edit/Default/RenderCustomView.d.ts +0 -2
- package/dist/views/Edit/Default/RenderCustomView.d.ts.map +0 -1
- package/dist/views/Edit/Default/RenderCustomView.js +0 -3
- package/dist/views/Edit/types.d.js +0 -7
- package/dist/views/Edit/types.d.ts +0 -32
- package/dist/views/Edit/types.d.ts.map +0 -1
- package/dist/views/Edit/types.js +0 -6
- package/dist/views/List/Default/Cell/cellTypes.spec.js +0 -234
- package/dist/views/List/Default/Cell/fields/Array/index.d.ts +0 -7
- package/dist/views/List/Default/Cell/fields/Array/index.d.ts.map +0 -1
- package/dist/views/List/Default/Cell/fields/Array/index.js +0 -27
- package/dist/views/List/Default/Cell/fields/Blocks/index.d.ts +0 -8
- package/dist/views/List/Default/Cell/fields/Blocks/index.d.ts.map +0 -1
- package/dist/views/List/Default/Cell/fields/Blocks/index.js +0 -45
- package/dist/views/List/Default/Cell/fields/Checkbox/index.d.ts +0 -5
- package/dist/views/List/Default/Cell/fields/Checkbox/index.d.ts.map +0 -1
- package/dist/views/List/Default/Cell/fields/Checkbox/index.js +0 -23
- package/dist/views/List/Default/Cell/fields/Checkbox/index.scss +0 -22
- package/dist/views/List/Default/Cell/fields/Code/index.d.ts +0 -8
- package/dist/views/List/Default/Cell/fields/Code/index.d.ts.map +0 -1
- package/dist/views/List/Default/Cell/fields/Code/index.js +0 -29
- package/dist/views/List/Default/Cell/fields/Code/index.scss +0 -27
- package/dist/views/List/Default/Cell/fields/Date/index.d.ts +0 -7
- package/dist/views/List/Default/Cell/fields/Date/index.d.ts.map +0 -1
- package/dist/views/List/Default/Cell/fields/Date/index.js +0 -26
- package/dist/views/List/Default/Cell/fields/File/index.d.ts +0 -7
- package/dist/views/List/Default/Cell/fields/File/index.d.ts.map +0 -1
- package/dist/views/List/Default/Cell/fields/File/index.js +0 -39
- package/dist/views/List/Default/Cell/fields/File/index.scss +0 -23
- package/dist/views/List/Default/Cell/fields/JSON/index.d.ts +0 -5
- package/dist/views/List/Default/Cell/fields/JSON/index.d.ts.map +0 -1
- package/dist/views/List/Default/Cell/fields/JSON/index.js +0 -26
- package/dist/views/List/Default/Cell/fields/JSON/index.scss +0 -22
- package/dist/views/List/Default/Cell/fields/Relationship/index.d.ts +0 -9
- package/dist/views/List/Default/Cell/fields/Relationship/index.d.ts.map +0 -1
- package/dist/views/List/Default/Cell/fields/Relationship/index.js +0 -121
- package/dist/views/List/Default/Cell/fields/Relationship/index.scss +0 -3
- package/dist/views/List/Default/Cell/fields/Richtext/index.d.ts +0 -2
- package/dist/views/List/Default/Cell/fields/Richtext/index.d.ts.map +0 -1
- package/dist/views/List/Default/Cell/fields/Richtext/index.js +0 -3
- package/dist/views/List/Default/Cell/fields/Select/index.d.ts +0 -7
- package/dist/views/List/Default/Cell/fields/Select/index.d.ts.map +0 -1
- package/dist/views/List/Default/Cell/fields/Select/index.js +0 -40
- package/dist/views/List/Default/Cell/fields/Textarea/index.d.ts +0 -4
- package/dist/views/List/Default/Cell/fields/Textarea/index.d.ts.map +0 -1
- package/dist/views/List/Default/Cell/fields/Textarea/index.js +0 -23
- package/dist/views/List/Default/Cell/fields/index.d.ts +0 -17
- package/dist/views/List/Default/Cell/fields/index.d.ts.map +0 -1
- package/dist/views/List/Default/Cell/fields/index.js +0 -36
- package/dist/views/List/Default/Cell/index.d.ts +0 -4
- package/dist/views/List/Default/Cell/index.d.ts.map +0 -1
- package/dist/views/List/Default/Cell/index.js +0 -89
- package/dist/views/List/Default/RelationshipProvider/index.d.ts +0 -20
- package/dist/views/List/Default/RelationshipProvider/index.d.ts.map +0 -1
- package/dist/views/List/Default/RelationshipProvider/index.js +0 -153
- package/dist/views/List/Default/RelationshipProvider/reducer.d.ts +0 -19
- package/dist/views/List/Default/RelationshipProvider/reducer.d.ts.map +0 -1
- package/dist/views/List/Default/RelationshipProvider/reducer.js +0 -55
- package/dist/views/Unauthorized/UnauthorizedClient.d.ts +0 -5
- package/dist/views/Unauthorized/UnauthorizedClient.d.ts.map +0 -1
- package/dist/views/Unauthorized/UnauthorizedClient.js +0 -27
- package/src/index.ts +0 -6
- /package/dist/{static/SuisseIntl-Bold.2211c494.woff → prod/payload/SuisseIntl-Bold.woff} +0 -0
- /package/dist/{static/SuisseIntl-Bold.9c7dfd00.woff2 → prod/payload/SuisseIntl-Bold.woff2} +0 -0
- /package/dist/{static/SuisseIntl-Medium.d7aeda9e.woff → prod/payload/SuisseIntl-Medium.woff} +0 -0
- /package/dist/{static/SuisseIntl-Medium.5b718d97.woff2 → prod/payload/SuisseIntl-Medium.woff2} +0 -0
- /package/dist/{static/SuisseIntl-SemiBold.e7caa9e1.woff → prod/payload/SuisseIntl-SemiBold.woff} +0 -0
- /package/dist/{static/SuisseIntl-SemiBold.40ad7515.woff2 → prod/payload/SuisseIntl-SemiBold.woff2} +0 -0
- /package/dist/{static/SuisseIntl.8b4ddd0d.woff → prod/payload/SuisseIntl.woff} +0 -0
- /package/dist/{static/SuisseIntl.51922ceb.woff2 → prod/payload/SuisseIntl.woff2} +0 -0
- /package/dist/{static/merriweather-v30-latin-900.efe8f6a3.woff → prod/payload/merriweather-v30-latin-900.woff} +0 -0
- /package/dist/{static/merriweather-v30-latin-900.52244336.woff2 → prod/payload/merriweather-v30-latin-900.woff2} +0 -0
- /package/dist/{static/merriweather-v30-latin-900italic.78b8935f.woff → prod/payload/merriweather-v30-latin-900italic.woff} +0 -0
- /package/dist/{static/merriweather-v30-latin-900italic.f53bb8d4.woff2 → prod/payload/merriweather-v30-latin-900italic.woff2} +0 -0
- /package/dist/{static/merriweather-v30-latin-italic.8f612153.woff → prod/payload/merriweather-v30-latin-italic.woff} +0 -0
- /package/dist/{static/merriweather-v30-latin-italic.a1cfdc5b.woff2 → prod/payload/merriweather-v30-latin-italic.woff2} +0 -0
- /package/dist/{static/merriweather-v30-latin-regular.787999a6.woff → prod/payload/merriweather-v30-latin-regular.woff} +0 -0
- /package/dist/{static/merriweather-v30-latin-regular.e009f214.woff2 → prod/payload/merriweather-v30-latin-regular.woff2} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/routes/rest/collections/docAccess.ts"],"sourcesContent":["import httpStatus from 'http-status'\nimport { docAccessOperation } from 'payload/operations'\n\nimport type { CollectionRouteHandlerWithID } from '../types.js'\n\nexport const docAccess: CollectionRouteHandlerWithID = async ({ id, collection, req }) => {\n const result = await docAccessOperation({\n id,\n collection,\n req,\n })\n\n return Response.json(result, {\n status: httpStatus.OK,\n })\n}\n"],"names":["httpStatus","docAccessOperation","docAccess","id","collection","req","result","Response","json","status","OK"],"rangeMappings":";;;;;;;;;;;","mappings":"AAAA,OAAOA,gBAAgB,cAAa;AACpC,SAASC,kBAAkB,QAAQ,qBAAoB;AAIvD,OAAO,MAAMC,YAA0C,OAAO,EAAEC,EAAE,EAAEC,UAAU,EAAEC,GAAG,EAAE;IACnF,MAAMC,SAAS,MAAML,mBAAmB;QACtCE;QACAC;QACAC;IACF;IAEA,OAAOE,SAASC,IAAI,CAACF,QAAQ;QAC3BG,QAAQT,WAAWU,EAAE;IACvB;AACF,EAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"duplicate.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/collections/duplicate.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAA;AAE/D,eAAO,MAAM,SAAS,EAAE,4BA2BvB,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { getTranslation } from '@payloadcms/translations';
|
|
2
|
+
import httpStatus from 'http-status';
|
|
3
|
+
import { duplicateOperation } from 'payload/operations';
|
|
4
|
+
import { isNumber } from 'payload/utilities';
|
|
5
|
+
export const duplicate = async ({ id, collection, req })=>{
|
|
6
|
+
const { searchParams } = req;
|
|
7
|
+
const depth = searchParams.get('depth');
|
|
8
|
+
// draft defaults to true, unless explicitly set requested as false to prevent the newly duplicated document from being published
|
|
9
|
+
const draft = searchParams.get('draft') !== 'false';
|
|
10
|
+
const doc = await duplicateOperation({
|
|
11
|
+
id,
|
|
12
|
+
collection,
|
|
13
|
+
depth: isNumber(depth) ? Number(depth) : undefined,
|
|
14
|
+
draft,
|
|
15
|
+
req
|
|
16
|
+
});
|
|
17
|
+
const message = req.t('general:successfullyDuplicated', {
|
|
18
|
+
label: getTranslation(collection.config.labels.singular, req.i18n)
|
|
19
|
+
});
|
|
20
|
+
return Response.json({
|
|
21
|
+
doc,
|
|
22
|
+
message
|
|
23
|
+
}, {
|
|
24
|
+
status: httpStatus.OK
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=duplicate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/routes/rest/collections/duplicate.ts"],"sourcesContent":["import { getTranslation } from '@payloadcms/translations'\nimport httpStatus from 'http-status'\nimport { duplicateOperation } from 'payload/operations'\nimport { isNumber } from 'payload/utilities'\n\nimport type { CollectionRouteHandlerWithID } from '../types.js'\n\nexport const duplicate: CollectionRouteHandlerWithID = async ({ id, collection, req }) => {\n const { searchParams } = req\n const depth = searchParams.get('depth')\n // draft defaults to true, unless explicitly set requested as false to prevent the newly duplicated document from being published\n const draft = searchParams.get('draft') !== 'false'\n\n const doc = await duplicateOperation({\n id,\n collection,\n depth: isNumber(depth) ? Number(depth) : undefined,\n draft,\n req,\n })\n\n const message = req.t('general:successfullyDuplicated', {\n label: getTranslation(collection.config.labels.singular, req.i18n),\n })\n\n return Response.json(\n {\n doc,\n message,\n },\n {\n status: httpStatus.OK,\n },\n )\n}\n"],"names":["getTranslation","httpStatus","duplicateOperation","isNumber","duplicate","id","collection","req","searchParams","depth","get","draft","doc","Number","undefined","message","t","label","config","labels","singular","i18n","Response","json","status","OK"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,cAAc,QAAQ,2BAA0B;AACzD,OAAOC,gBAAgB,cAAa;AACpC,SAASC,kBAAkB,QAAQ,qBAAoB;AACvD,SAASC,QAAQ,QAAQ,oBAAmB;AAI5C,OAAO,MAAMC,YAA0C,OAAO,EAAEC,EAAE,EAAEC,UAAU,EAAEC,GAAG,EAAE;IACnF,MAAM,EAAEC,YAAY,EAAE,GAAGD;IACzB,MAAME,QAAQD,aAAaE,GAAG,CAAC;IAC/B,iIAAiI;IACjI,MAAMC,QAAQH,aAAaE,GAAG,CAAC,aAAa;IAE5C,MAAME,MAAM,MAAMV,mBAAmB;QACnCG;QACAC;QACAG,OAAON,SAASM,SAASI,OAAOJ,SAASK;QACzCH;QACAJ;IACF;IAEA,MAAMQ,UAAUR,IAAIS,CAAC,CAAC,kCAAkC;QACtDC,OAAOjB,eAAeM,WAAWY,MAAM,CAACC,MAAM,CAACC,QAAQ,EAAEb,IAAIc,IAAI;IACnE;IAEA,OAAOC,SAASC,IAAI,CAClB;QACEX;QACAG;IACF,GACA;QACES,QAAQvB,WAAWwB,EAAE;IACvB;AAEJ,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/collections/find.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/collections/find.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAEzD,eAAO,MAAM,IAAI,EAAE,sBAwBlB,CAAA"}
|
|
@@ -1,39 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
})
|
|
5
|
-
|
|
6
|
-
|
|
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 })=>{
|
|
21
|
-
const { searchParams } = req;
|
|
22
|
-
// parse using `qs` to handle `where` queries
|
|
23
|
-
const { depth, draft, limit, page, sort, where } = _qs.default.parse(searchParams.toString());
|
|
24
|
-
const result = await (0, _operations.findOperation)({
|
|
1
|
+
import httpStatus from 'http-status';
|
|
2
|
+
import { findOperation } from 'payload/operations';
|
|
3
|
+
import { isNumber } from 'payload/utilities';
|
|
4
|
+
export const find = async ({ collection, req })=>{
|
|
5
|
+
const { depth, draft, limit, page, sort, where } = req.query;
|
|
6
|
+
const result = await findOperation({
|
|
25
7
|
collection,
|
|
26
|
-
depth:
|
|
8
|
+
depth: isNumber(depth) ? Number(depth) : undefined,
|
|
27
9
|
draft: draft === 'true',
|
|
28
|
-
limit:
|
|
29
|
-
page:
|
|
10
|
+
limit: isNumber(limit) ? Number(limit) : undefined,
|
|
11
|
+
page: isNumber(page) ? Number(page) : undefined,
|
|
30
12
|
req,
|
|
31
13
|
sort,
|
|
32
14
|
where
|
|
33
15
|
});
|
|
34
16
|
return Response.json(result, {
|
|
35
|
-
status:
|
|
17
|
+
status: httpStatus.OK
|
|
36
18
|
});
|
|
37
19
|
};
|
|
38
20
|
|
|
39
|
-
//# sourceMappingURL=
|
|
21
|
+
//# sourceMappingURL=find.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/routes/rest/collections/find.ts"],"sourcesContent":["import type { Where } from 'payload/types'\n\nimport httpStatus from 'http-status'\nimport { findOperation } from 'payload/operations'\nimport { isNumber } from 'payload/utilities'\n\nimport type { CollectionRouteHandler } from '../types.js'\n\nexport const find: CollectionRouteHandler = async ({ collection, req }) => {\n const { depth, draft, limit, page, sort, where } = req.query as {\n depth?: string\n draft?: string\n limit?: string\n page?: string\n sort?: string\n where?: Where\n }\n\n const result = await findOperation({\n collection,\n depth: isNumber(depth) ? Number(depth) : undefined,\n draft: draft === 'true',\n limit: isNumber(limit) ? Number(limit) : undefined,\n page: isNumber(page) ? Number(page) : undefined,\n req,\n sort,\n where,\n })\n\n return Response.json(result, {\n status: httpStatus.OK,\n })\n}\n"],"names":["httpStatus","findOperation","isNumber","find","collection","req","depth","draft","limit","page","sort","where","query","result","Number","undefined","Response","json","status","OK"],"rangeMappings":";;;;;;;;;;;;;;;;;;","mappings":"AAEA,OAAOA,gBAAgB,cAAa;AACpC,SAASC,aAAa,QAAQ,qBAAoB;AAClD,SAASC,QAAQ,QAAQ,oBAAmB;AAI5C,OAAO,MAAMC,OAA+B,OAAO,EAAEC,UAAU,EAAEC,GAAG,EAAE;IACpE,MAAM,EAAEC,KAAK,EAAEC,KAAK,EAAEC,KAAK,EAAEC,IAAI,EAAEC,IAAI,EAAEC,KAAK,EAAE,GAAGN,IAAIO,KAAK;IAS5D,MAAMC,SAAS,MAAMZ,cAAc;QACjCG;QACAE,OAAOJ,SAASI,SAASQ,OAAOR,SAASS;QACzCR,OAAOA,UAAU;QACjBC,OAAON,SAASM,SAASM,OAAON,SAASO;QACzCN,MAAMP,SAASO,QAAQK,OAAOL,QAAQM;QACtCV;QACAK;QACAC;IACF;IAEA,OAAOK,SAASC,IAAI,CAACJ,QAAQ;QAC3BK,QAAQlB,WAAWmB,EAAE;IACvB;AACF,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findByID.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/collections/findByID.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"findByID.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/collections/findByID.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAA;AAE/D,eAAO,MAAM,QAAQ,EAAE,4BAetB,CAAA"}
|
|
@@ -1,34 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
})
|
|
5
|
-
Object.defineProperty(exports, "findByID", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return findByID;
|
|
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 findByID = async ({ id, collection, req })=>{
|
|
1
|
+
import httpStatus from 'http-status';
|
|
2
|
+
import { findByIDOperation } from 'payload/operations';
|
|
3
|
+
import { isNumber } from 'payload/utilities';
|
|
4
|
+
export const findByID = async ({ id, collection, req })=>{
|
|
20
5
|
const { searchParams } = req;
|
|
21
6
|
const depth = searchParams.get('depth');
|
|
22
|
-
const result = await
|
|
7
|
+
const result = await findByIDOperation({
|
|
23
8
|
id,
|
|
24
9
|
collection,
|
|
25
|
-
depth:
|
|
10
|
+
depth: isNumber(depth) ? Number(depth) : undefined,
|
|
26
11
|
draft: searchParams.get('draft') === 'true',
|
|
27
12
|
req
|
|
28
13
|
});
|
|
29
14
|
return Response.json(result, {
|
|
30
|
-
status:
|
|
15
|
+
status: httpStatus.OK
|
|
31
16
|
});
|
|
32
17
|
};
|
|
33
18
|
|
|
34
|
-
//# sourceMappingURL=
|
|
19
|
+
//# sourceMappingURL=findByID.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/routes/rest/collections/findByID.ts"],"sourcesContent":["import httpStatus from 'http-status'\nimport { findByIDOperation } from 'payload/operations'\nimport { isNumber } from 'payload/utilities'\n\nimport type { CollectionRouteHandlerWithID } from '../types.js'\n\nexport const findByID: CollectionRouteHandlerWithID = async ({ id, collection, req }) => {\n const { searchParams } = req\n const depth = searchParams.get('depth')\n\n const result = await findByIDOperation({\n id,\n collection,\n depth: isNumber(depth) ? Number(depth) : undefined,\n draft: searchParams.get('draft') === 'true',\n req,\n })\n\n return Response.json(result, {\n status: httpStatus.OK,\n })\n}\n"],"names":["httpStatus","findByIDOperation","isNumber","findByID","id","collection","req","searchParams","depth","get","result","Number","undefined","draft","Response","json","status","OK"],"rangeMappings":";;;;;;;;;;;;;;;;","mappings":"AAAA,OAAOA,gBAAgB,cAAa;AACpC,SAASC,iBAAiB,QAAQ,qBAAoB;AACtD,SAASC,QAAQ,QAAQ,oBAAmB;AAI5C,OAAO,MAAMC,WAAyC,OAAO,EAAEC,EAAE,EAAEC,UAAU,EAAEC,GAAG,EAAE;IAClF,MAAM,EAAEC,YAAY,EAAE,GAAGD;IACzB,MAAME,QAAQD,aAAaE,GAAG,CAAC;IAE/B,MAAMC,SAAS,MAAMT,kBAAkB;QACrCG;QACAC;QACAG,OAAON,SAASM,SAASG,OAAOH,SAASI;QACzCC,OAAON,aAAaE,GAAG,CAAC,aAAa;QACrCH;IACF;IAEA,OAAOQ,SAASC,IAAI,CAACL,QAAQ;QAC3BM,QAAQhB,WAAWiB,EAAE;IACvB;AACF,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findVersionByID.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/collections/findVersionByID.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"findVersionByID.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/collections/findVersionByID.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAA;AAE/D,eAAO,MAAM,eAAe,EAAE,4BAc7B,CAAA"}
|
|
@@ -1,33 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
})
|
|
5
|
-
Object.defineProperty(exports, "findVersionByID", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return findVersionByID;
|
|
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 findVersionByID = async ({ id, collection, req })=>{
|
|
1
|
+
import httpStatus from 'http-status';
|
|
2
|
+
import { findVersionByIDOperation } from 'payload/operations';
|
|
3
|
+
import { isNumber } from 'payload/utilities';
|
|
4
|
+
export const findVersionByID = async ({ id, collection, req })=>{
|
|
20
5
|
const { searchParams } = req;
|
|
21
6
|
const depth = searchParams.get('depth');
|
|
22
|
-
const result = await
|
|
7
|
+
const result = await findVersionByIDOperation({
|
|
23
8
|
id,
|
|
24
9
|
collection,
|
|
25
|
-
depth:
|
|
10
|
+
depth: isNumber(depth) ? Number(depth) : undefined,
|
|
26
11
|
req
|
|
27
12
|
});
|
|
28
13
|
return Response.json(result, {
|
|
29
|
-
status:
|
|
14
|
+
status: httpStatus.OK
|
|
30
15
|
});
|
|
31
16
|
};
|
|
32
17
|
|
|
33
|
-
//# sourceMappingURL=
|
|
18
|
+
//# sourceMappingURL=findVersionByID.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/routes/rest/collections/findVersionByID.ts"],"sourcesContent":["import httpStatus from 'http-status'\nimport { findVersionByIDOperation } from 'payload/operations'\nimport { isNumber } from 'payload/utilities'\n\nimport type { CollectionRouteHandlerWithID } from '../types.js'\n\nexport const findVersionByID: CollectionRouteHandlerWithID = async ({ id, collection, req }) => {\n const { searchParams } = req\n const depth = searchParams.get('depth')\n\n const result = await findVersionByIDOperation({\n id,\n collection,\n depth: isNumber(depth) ? Number(depth) : undefined,\n req,\n })\n\n return Response.json(result, {\n status: httpStatus.OK,\n })\n}\n"],"names":["httpStatus","findVersionByIDOperation","isNumber","findVersionByID","id","collection","req","searchParams","depth","get","result","Number","undefined","Response","json","status","OK"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":"AAAA,OAAOA,gBAAgB,cAAa;AACpC,SAASC,wBAAwB,QAAQ,qBAAoB;AAC7D,SAASC,QAAQ,QAAQ,oBAAmB;AAI5C,OAAO,MAAMC,kBAAgD,OAAO,EAAEC,EAAE,EAAEC,UAAU,EAAEC,GAAG,EAAE;IACzF,MAAM,EAAEC,YAAY,EAAE,GAAGD;IACzB,MAAME,QAAQD,aAAaE,GAAG,CAAC;IAE/B,MAAMC,SAAS,MAAMT,yBAAyB;QAC5CG;QACAC;QACAG,OAAON,SAASM,SAASG,OAAOH,SAASI;QACzCN;IACF;IAEA,OAAOO,SAASC,IAAI,CAACJ,QAAQ;QAC3BK,QAAQf,WAAWgB,EAAE;IACvB;AACF,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findVersions.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/collections/findVersions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"findVersions.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/collections/findVersions.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAEzD,eAAO,MAAM,YAAY,EAAE,sBAsB1B,CAAA"}
|
|
@@ -1,38 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
})
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
get: function() {
|
|
8
|
-
return findVersions;
|
|
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 findVersions = async ({ collection, req })=>{
|
|
21
|
-
const { searchParams } = req;
|
|
22
|
-
// parse using `qs` to handle `where` queries
|
|
23
|
-
const { depth, limit, page, sort, where } = _qs.default.parse(searchParams.toString());
|
|
24
|
-
const result = await (0, _operations.findVersionsOperation)({
|
|
1
|
+
import httpStatus from 'http-status';
|
|
2
|
+
import { findVersionsOperation } from 'payload/operations';
|
|
3
|
+
import { isNumber } from 'payload/utilities';
|
|
4
|
+
export const findVersions = async ({ collection, req })=>{
|
|
5
|
+
const { depth, limit, page, sort, where } = req.query;
|
|
6
|
+
const result = await findVersionsOperation({
|
|
25
7
|
collection,
|
|
26
|
-
depth:
|
|
27
|
-
limit:
|
|
28
|
-
page:
|
|
8
|
+
depth: isNumber(depth) ? Number(depth) : undefined,
|
|
9
|
+
limit: isNumber(limit) ? Number(limit) : undefined,
|
|
10
|
+
page: isNumber(page) ? Number(page) : undefined,
|
|
29
11
|
req,
|
|
30
12
|
sort,
|
|
31
13
|
where
|
|
32
14
|
});
|
|
33
15
|
return Response.json(result, {
|
|
34
|
-
status:
|
|
16
|
+
status: httpStatus.OK
|
|
35
17
|
});
|
|
36
18
|
};
|
|
37
19
|
|
|
38
|
-
//# sourceMappingURL=
|
|
20
|
+
//# sourceMappingURL=findVersions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/routes/rest/collections/findVersions.ts"],"sourcesContent":["import type { Where } from 'payload/types'\n\nimport httpStatus from 'http-status'\nimport { findVersionsOperation } from 'payload/operations'\nimport { isNumber } from 'payload/utilities'\n\nimport type { CollectionRouteHandler } from '../types.js'\n\nexport const findVersions: CollectionRouteHandler = async ({ collection, req }) => {\n const { depth, limit, page, sort, where } = req.query as {\n depth?: string\n limit?: string\n page?: string\n sort?: string\n where?: Where\n }\n\n const result = await findVersionsOperation({\n collection,\n depth: isNumber(depth) ? Number(depth) : undefined,\n limit: isNumber(limit) ? Number(limit) : undefined,\n page: isNumber(page) ? Number(page) : undefined,\n req,\n sort,\n where,\n })\n\n return Response.json(result, {\n status: httpStatus.OK,\n })\n}\n"],"names":["httpStatus","findVersionsOperation","isNumber","findVersions","collection","req","depth","limit","page","sort","where","query","result","Number","undefined","Response","json","status","OK"],"rangeMappings":";;;;;;;;;;;;;;;;;","mappings":"AAEA,OAAOA,gBAAgB,cAAa;AACpC,SAASC,qBAAqB,QAAQ,qBAAoB;AAC1D,SAASC,QAAQ,QAAQ,oBAAmB;AAI5C,OAAO,MAAMC,eAAuC,OAAO,EAAEC,UAAU,EAAEC,GAAG,EAAE;IAC5E,MAAM,EAAEC,KAAK,EAAEC,KAAK,EAAEC,IAAI,EAAEC,IAAI,EAAEC,KAAK,EAAE,GAAGL,IAAIM,KAAK;IAQrD,MAAMC,SAAS,MAAMX,sBAAsB;QACzCG;QACAE,OAAOJ,SAASI,SAASO,OAAOP,SAASQ;QACzCP,OAAOL,SAASK,SAASM,OAAON,SAASO;QACzCN,MAAMN,SAASM,QAAQK,OAAOL,QAAQM;QACtCT;QACAI;QACAC;IACF;IAEA,OAAOK,SAASC,IAAI,CAACJ,QAAQ;QAC3BK,QAAQjB,WAAWkB,EAAE;IACvB;AACF,EAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/collections/preview.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAA;AAI/D,eAAO,MAAM,OAAO,EAAE,4BAoCrB,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import httpStatus from 'http-status';
|
|
2
|
+
import { findByIDOperation } from 'payload/operations';
|
|
3
|
+
import { isNumber } from 'payload/utilities';
|
|
4
|
+
import { routeError } from '../routeError.js';
|
|
5
|
+
export const preview = async ({ id, collection, req })=>{
|
|
6
|
+
const { searchParams } = req;
|
|
7
|
+
const depth = searchParams.get('depth');
|
|
8
|
+
const result = await findByIDOperation({
|
|
9
|
+
id,
|
|
10
|
+
collection,
|
|
11
|
+
depth: isNumber(depth) ? Number(depth) : undefined,
|
|
12
|
+
draft: searchParams.get('draft') === 'true',
|
|
13
|
+
req
|
|
14
|
+
});
|
|
15
|
+
let previewURL;
|
|
16
|
+
const generatePreviewURL = req.payload.config.collections.find((config)=>config.slug === collection.config.slug)?.admin?.preview;
|
|
17
|
+
if (typeof generatePreviewURL === 'function') {
|
|
18
|
+
try {
|
|
19
|
+
previewURL = await generatePreviewURL(result, {
|
|
20
|
+
locale: req.locale,
|
|
21
|
+
token: req.user?.token
|
|
22
|
+
});
|
|
23
|
+
} catch (err) {
|
|
24
|
+
routeError({
|
|
25
|
+
collection,
|
|
26
|
+
err,
|
|
27
|
+
req
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return Response.json(previewURL, {
|
|
32
|
+
status: httpStatus.OK
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=preview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/routes/rest/collections/preview.ts"],"sourcesContent":["import httpStatus from 'http-status'\nimport { findByIDOperation } from 'payload/operations'\nimport { isNumber } from 'payload/utilities'\n\nimport type { CollectionRouteHandlerWithID } from '../types.js'\n\nimport { routeError } from '../routeError.js'\n\nexport const preview: CollectionRouteHandlerWithID = async ({ id, collection, req }) => {\n const { searchParams } = req\n const depth = searchParams.get('depth')\n\n const result = await findByIDOperation({\n id,\n collection,\n depth: isNumber(depth) ? Number(depth) : undefined,\n draft: searchParams.get('draft') === 'true',\n req,\n })\n\n let previewURL: string\n\n const generatePreviewURL = req.payload.config.collections.find(\n (config) => config.slug === collection.config.slug,\n )?.admin?.preview\n\n if (typeof generatePreviewURL === 'function') {\n try {\n previewURL = await generatePreviewURL(result, {\n locale: req.locale,\n token: req.user?.token,\n })\n } catch (err) {\n routeError({\n collection,\n err,\n req,\n })\n }\n }\n\n return Response.json(previewURL, {\n status: httpStatus.OK,\n })\n}\n"],"names":["httpStatus","findByIDOperation","isNumber","routeError","preview","id","collection","req","searchParams","depth","get","result","Number","undefined","draft","previewURL","generatePreviewURL","payload","config","collections","find","slug","admin","locale","token","user","err","Response","json","status","OK"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,OAAOA,gBAAgB,cAAa;AACpC,SAASC,iBAAiB,QAAQ,qBAAoB;AACtD,SAASC,QAAQ,QAAQ,oBAAmB;AAI5C,SAASC,UAAU,QAAQ,mBAAkB;AAE7C,OAAO,MAAMC,UAAwC,OAAO,EAAEC,EAAE,EAAEC,UAAU,EAAEC,GAAG,EAAE;IACjF,MAAM,EAAEC,YAAY,EAAE,GAAGD;IACzB,MAAME,QAAQD,aAAaE,GAAG,CAAC;IAE/B,MAAMC,SAAS,MAAMV,kBAAkB;QACrCI;QACAC;QACAG,OAAOP,SAASO,SAASG,OAAOH,SAASI;QACzCC,OAAON,aAAaE,GAAG,CAAC,aAAa;QACrCH;IACF;IAEA,IAAIQ;IAEJ,MAAMC,qBAAqBT,IAAIU,OAAO,CAACC,MAAM,CAACC,WAAW,CAACC,IAAI,CAC5D,CAACF,SAAWA,OAAOG,IAAI,KAAKf,WAAWY,MAAM,CAACG,IAAI,GACjDC,OAAOlB;IAEV,IAAI,OAAOY,uBAAuB,YAAY;QAC5C,IAAI;YACFD,aAAa,MAAMC,mBAAmBL,QAAQ;gBAC5CY,QAAQhB,IAAIgB,MAAM;gBAClBC,OAAOjB,IAAIkB,IAAI,EAAED;YACnB;QACF,EAAE,OAAOE,KAAK;YACZvB,WAAW;gBACTG;gBACAoB;gBACAnB;YACF;QACF;IACF;IAEA,OAAOoB,SAASC,IAAI,CAACb,YAAY;QAC/Bc,QAAQ7B,WAAW8B,EAAE;IACvB;AACF,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restoreVersion.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/collections/restoreVersion.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"restoreVersion.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/collections/restoreVersion.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAA;AAE/D,eAAO,MAAM,cAAc,EAAE,4BAoB5B,CAAA"}
|
|
@@ -1,36 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
})
|
|
5
|
-
Object.defineProperty(exports, "restoreVersion", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return restoreVersion;
|
|
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 restoreVersion = async ({ id, collection, req })=>{
|
|
1
|
+
import httpStatus from 'http-status';
|
|
2
|
+
import { restoreVersionOperation } from 'payload/operations';
|
|
3
|
+
import { isNumber } from 'payload/utilities';
|
|
4
|
+
export const restoreVersion = async ({ id, collection, req })=>{
|
|
20
5
|
const { searchParams } = req;
|
|
21
6
|
const depth = searchParams.get('depth');
|
|
22
|
-
const result = await
|
|
7
|
+
const result = await restoreVersionOperation({
|
|
23
8
|
id,
|
|
24
9
|
collection,
|
|
25
|
-
depth:
|
|
10
|
+
depth: isNumber(depth) ? Number(depth) : undefined,
|
|
26
11
|
req
|
|
27
12
|
});
|
|
28
13
|
return Response.json({
|
|
29
14
|
...result,
|
|
30
15
|
message: req.t('version:restoredSuccessfully')
|
|
31
16
|
}, {
|
|
32
|
-
status:
|
|
17
|
+
status: httpStatus.OK
|
|
33
18
|
});
|
|
34
19
|
};
|
|
35
20
|
|
|
36
|
-
//# sourceMappingURL=
|
|
21
|
+
//# sourceMappingURL=restoreVersion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/routes/rest/collections/restoreVersion.ts"],"sourcesContent":["import httpStatus from 'http-status'\nimport { restoreVersionOperation } from 'payload/operations'\nimport { isNumber } from 'payload/utilities'\n\nimport type { CollectionRouteHandlerWithID } from '../types.js'\n\nexport const restoreVersion: CollectionRouteHandlerWithID = async ({ id, collection, req }) => {\n const { searchParams } = req\n const depth = searchParams.get('depth')\n\n const result = await restoreVersionOperation({\n id,\n collection,\n depth: isNumber(depth) ? Number(depth) : undefined,\n req,\n })\n\n return Response.json(\n {\n ...result,\n message: req.t('version:restoredSuccessfully'),\n },\n {\n status: httpStatus.OK,\n },\n )\n}\n"],"names":["httpStatus","restoreVersionOperation","isNumber","restoreVersion","id","collection","req","searchParams","depth","get","result","Number","undefined","Response","json","message","t","status","OK"],"rangeMappings":";;;;;;;;;;;;;;;;;;","mappings":"AAAA,OAAOA,gBAAgB,cAAa;AACpC,SAASC,uBAAuB,QAAQ,qBAAoB;AAC5D,SAASC,QAAQ,QAAQ,oBAAmB;AAI5C,OAAO,MAAMC,iBAA+C,OAAO,EAAEC,EAAE,EAAEC,UAAU,EAAEC,GAAG,EAAE;IACxF,MAAM,EAAEC,YAAY,EAAE,GAAGD;IACzB,MAAME,QAAQD,aAAaE,GAAG,CAAC;IAE/B,MAAMC,SAAS,MAAMT,wBAAwB;QAC3CG;QACAC;QACAG,OAAON,SAASM,SAASG,OAAOH,SAASI;QACzCN;IACF;IAEA,OAAOO,SAASC,IAAI,CAClB;QACE,GAAGJ,MAAM;QACTK,SAAST,IAAIU,CAAC,CAAC;IACjB,GACA;QACEC,QAAQjB,WAAWkB,EAAE;IACvB;AAEJ,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/collections/update.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/collections/update.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAEzD,eAAO,MAAM,MAAM,EAAE,sBAoDpB,CAAA"}
|
|
@@ -1,31 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return update;
|
|
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 update = async ({ collection, req })=>{
|
|
22
|
-
const { searchParams } = req;
|
|
23
|
-
// parse using `qs` to handle `where` queries
|
|
24
|
-
const { depth, draft, where } = _qs.default.parse(searchParams.toString());
|
|
25
|
-
const result = await (0, _operations.updateOperation)({
|
|
1
|
+
import { getTranslation } from '@payloadcms/translations';
|
|
2
|
+
import httpStatus from 'http-status';
|
|
3
|
+
import { updateOperation } from 'payload/operations';
|
|
4
|
+
import { isNumber } from 'payload/utilities';
|
|
5
|
+
export const update = async ({ collection, req })=>{
|
|
6
|
+
const { depth, draft, where } = req.query;
|
|
7
|
+
const result = await updateOperation({
|
|
26
8
|
collection,
|
|
27
9
|
data: req.data,
|
|
28
|
-
depth:
|
|
10
|
+
depth: isNumber(depth) ? Number(depth) : undefined,
|
|
29
11
|
draft: draft === 'true',
|
|
30
12
|
req,
|
|
31
13
|
where
|
|
@@ -33,27 +15,27 @@ const update = async ({ collection, req })=>{
|
|
|
33
15
|
if (result.errors.length === 0) {
|
|
34
16
|
const message = req.t('general:updatedCountSuccessfully', {
|
|
35
17
|
count: result.docs.length,
|
|
36
|
-
label:
|
|
18
|
+
label: getTranslation(collection.config.labels[result.docs.length > 1 ? 'plural' : 'singular'], req.i18n)
|
|
37
19
|
});
|
|
38
20
|
return Response.json({
|
|
39
21
|
...result,
|
|
40
22
|
message
|
|
41
23
|
}, {
|
|
42
|
-
status:
|
|
24
|
+
status: httpStatus.OK
|
|
43
25
|
});
|
|
44
26
|
}
|
|
45
27
|
const total = result.docs.length + result.errors.length;
|
|
46
28
|
const message = req.t('error:unableToUpdateCount', {
|
|
47
29
|
count: result.errors.length,
|
|
48
|
-
label:
|
|
30
|
+
label: getTranslation(collection.config.labels[total > 1 ? 'plural' : 'singular'], req.i18n),
|
|
49
31
|
total
|
|
50
32
|
});
|
|
51
33
|
return Response.json({
|
|
52
34
|
...result,
|
|
53
35
|
message
|
|
54
36
|
}, {
|
|
55
|
-
status:
|
|
37
|
+
status: httpStatus.BAD_REQUEST
|
|
56
38
|
});
|
|
57
39
|
};
|
|
58
40
|
|
|
59
|
-
//# sourceMappingURL=
|
|
41
|
+
//# sourceMappingURL=update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/routes/rest/collections/update.ts"],"sourcesContent":["import type { Where } from 'payload/types'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport httpStatus from 'http-status'\nimport { updateOperation } from 'payload/operations'\nimport { isNumber } from 'payload/utilities'\n\nimport type { CollectionRouteHandler } from '../types.js'\n\nexport const update: CollectionRouteHandler = async ({ collection, req }) => {\n const { depth, draft, where } = req.query as {\n depth?: string\n draft?: string\n where?: Where\n }\n\n const result = await updateOperation({\n collection,\n data: req.data,\n depth: isNumber(depth) ? Number(depth) : undefined,\n draft: draft === 'true',\n req,\n where,\n })\n\n if (result.errors.length === 0) {\n const message = req.t('general:updatedCountSuccessfully', {\n count: result.docs.length,\n label: getTranslation(\n collection.config.labels[result.docs.length > 1 ? 'plural' : 'singular'],\n req.i18n,\n ),\n })\n\n return Response.json(\n {\n ...result,\n message,\n },\n {\n status: httpStatus.OK,\n },\n )\n }\n\n const total = result.docs.length + result.errors.length\n const message = req.t('error:unableToUpdateCount', {\n count: result.errors.length,\n label: getTranslation(collection.config.labels[total > 1 ? 'plural' : 'singular'], req.i18n),\n total,\n })\n\n return Response.json(\n {\n ...result,\n message,\n },\n {\n status: httpStatus.BAD_REQUEST,\n },\n )\n}\n"],"names":["getTranslation","httpStatus","updateOperation","isNumber","update","collection","req","depth","draft","where","query","result","data","Number","undefined","errors","length","message","t","count","docs","label","config","labels","i18n","Response","json","status","OK","total","BAD_REQUEST"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,SAASA,cAAc,QAAQ,2BAA0B;AACzD,OAAOC,gBAAgB,cAAa;AACpC,SAASC,eAAe,QAAQ,qBAAoB;AACpD,SAASC,QAAQ,QAAQ,oBAAmB;AAI5C,OAAO,MAAMC,SAAiC,OAAO,EAAEC,UAAU,EAAEC,GAAG,EAAE;IACtE,MAAM,EAAEC,KAAK,EAAEC,KAAK,EAAEC,KAAK,EAAE,GAAGH,IAAII,KAAK;IAMzC,MAAMC,SAAS,MAAMT,gBAAgB;QACnCG;QACAO,MAAMN,IAAIM,IAAI;QACdL,OAAOJ,SAASI,SAASM,OAAON,SAASO;QACzCN,OAAOA,UAAU;QACjBF;QACAG;IACF;IAEA,IAAIE,OAAOI,MAAM,CAACC,MAAM,KAAK,GAAG;QAC9B,MAAMC,UAAUX,IAAIY,CAAC,CAAC,oCAAoC;YACxDC,OAAOR,OAAOS,IAAI,CAACJ,MAAM;YACzBK,OAAOrB,eACLK,WAAWiB,MAAM,CAACC,MAAM,CAACZ,OAAOS,IAAI,CAACJ,MAAM,GAAG,IAAI,WAAW,WAAW,EACxEV,IAAIkB,IAAI;QAEZ;QAEA,OAAOC,SAASC,IAAI,CAClB;YACE,GAAGf,MAAM;YACTM;QACF,GACA;YACEU,QAAQ1B,WAAW2B,EAAE;QACvB;IAEJ;IAEA,MAAMC,QAAQlB,OAAOS,IAAI,CAACJ,MAAM,GAAGL,OAAOI,MAAM,CAACC,MAAM;IACvD,MAAMC,UAAUX,IAAIY,CAAC,CAAC,6BAA6B;QACjDC,OAAOR,OAAOI,MAAM,CAACC,MAAM;QAC3BK,OAAOrB,eAAeK,WAAWiB,MAAM,CAACC,MAAM,CAACM,QAAQ,IAAI,WAAW,WAAW,EAAEvB,IAAIkB,IAAI;QAC3FK;IACF;IAEA,OAAOJ,SAASC,IAAI,CAClB;QACE,GAAGf,MAAM;QACTM;IACF,GACA;QACEU,QAAQ1B,WAAW6B,WAAW;IAChC;AAEJ,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateByID.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/collections/updateByID.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"updateByID.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/collections/updateByID.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAA;AAE/D,eAAO,MAAM,UAAU,EAAE,4BA8BxB,CAAA"}
|