@payloadcms/next 3.56.0-canary.3 → 3.56.0-internal.457de85

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/views/CreateFirstUser/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EAGrB,MAAM,SAAS,CAAA;AAGhB,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,cAAc,CAAA;AAErB,wBAAsB,mBAAmB,CAAC,EAAE,cAAc,EAAE,EAAE,oBAAoB,8BA8EjF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/views/CreateFirstUser/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EAGrB,MAAM,SAAS,CAAA;AAGhB,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,cAAc,CAAA;AAErB,wBAAsB,mBAAmB,CAAC,EAAE,cAAc,EAAE,EAAE,oBAAoB,8BA6EjF"}
@@ -67,7 +67,6 @@ export async function CreateFirstUserView({
67
67
  renderAllFields: true,
68
68
  req,
69
69
  schemaPath: collectionConfig.slug,
70
- skipClientConfigAuth: true,
71
70
  skipValidation: true
72
71
  });
73
72
  return /*#__PURE__*/_jsxs("div", {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["buildFormState","React","getDocPreferences","getDocumentData","CreateFirstUserClient","CreateFirstUserView","initPageResult","locale","req","payload","collections","config","admin","user","userSlug","collectionConfig","auth","authOptions","loginWithUsername","data","collectionSlug","slug","docPreferences","baseFields","Object","fromEntries","fields","filter","f","name","map","create","read","update","docPermissionsForForm","delete","readVersions","state","formState","docPermissions","code","operation","renderAllFields","schemaPath","skipClientConfigAuth","skipValidation","_jsxs","className","_jsx","t","initialState"],"sources":["../../../src/views/CreateFirstUser/index.tsx"],"sourcesContent":["import type {\n AdminViewServerProps,\n SanitizedDocumentPermissions,\n SanitizedFieldsPermissions,\n} from 'payload'\n\nimport { buildFormState } from '@payloadcms/ui/utilities/buildFormState'\nimport React from 'react'\n\nimport { getDocPreferences } from '../Document/getDocPreferences.js'\nimport { getDocumentData } from '../Document/getDocumentData.js'\nimport { CreateFirstUserClient } from './index.client.js'\nimport './index.scss'\n\nexport async function CreateFirstUserView({ initPageResult }: AdminViewServerProps) {\n const {\n locale,\n req,\n req: {\n payload: {\n collections,\n config: {\n admin: { user: userSlug },\n },\n },\n },\n } = initPageResult\n\n const collectionConfig = collections?.[userSlug]?.config\n const { auth: authOptions } = collectionConfig\n const loginWithUsername = authOptions.loginWithUsername\n\n // Fetch the data required for the view\n const data = await getDocumentData({\n collectionSlug: collectionConfig.slug,\n locale,\n payload: req.payload,\n req,\n user: req.user,\n })\n\n // Get document preferences\n const docPreferences = await getDocPreferences({\n collectionSlug: collectionConfig.slug,\n payload: req.payload,\n user: req.user,\n })\n\n const baseFields: SanitizedFieldsPermissions = Object.fromEntries(\n collectionConfig.fields\n .filter((f): f is { name: string } & typeof f => 'name' in f && typeof f.name === 'string')\n .map((f) => [f.name, { create: true, read: true, update: true }]),\n )\n\n // In create-first-user we should always allow all fields\n const docPermissionsForForm: SanitizedDocumentPermissions = {\n create: true,\n delete: true,\n fields: baseFields,\n read: true,\n readVersions: true,\n update: true,\n }\n\n // Build initial form state from data\n const { state: formState } = await buildFormState({\n collectionSlug: collectionConfig.slug,\n data,\n docPermissions: docPermissionsForForm,\n docPreferences,\n locale: locale?.code,\n operation: 'create',\n renderAllFields: true,\n req,\n schemaPath: collectionConfig.slug,\n skipClientConfigAuth: true,\n skipValidation: true,\n })\n\n return (\n <div className=\"create-first-user\">\n <h1>{req.t('general:welcome')}</h1>\n <p>{req.t('authentication:beginCreateFirstUser')}</p>\n <CreateFirstUserClient\n docPermissions={docPermissionsForForm}\n docPreferences={docPreferences}\n initialState={formState}\n loginWithUsername={loginWithUsername}\n userSlug={userSlug}\n />\n </div>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;EAAK,EAAE;EAGpE;EACA,MAAMC,qBAAA,GAAsD;IAC1DH,MAAA,EAAQ;IACRI,MAAA,EAAQ;IACRT,MAAA,EAAQH,UAAA;IACRS,IAAA,EAAM;IACNI,YAAA,EAAc;IACdH,MAAA,EAAQ;EACV;EAEA;EACA,MAAM;IAAEI,KAAA,EAAOC;EAAS,CAAE,GAAG,MAAMtC,cAAA,CAAe;IAChDoB,cAAA,EAAgBL,gBAAA,CAAiBM,IAAI;IACrCF,IAAA;IACAoB,cAAA,EAAgBL,qBAAA;IAChBZ,cAAA;IACAf,MAAA,EAAQA,MAAA,EAAQiC,IAAA;IAChBC,SAAA,EAAW;IACXC,eAAA,EAAiB;IACjBlC,GAAA;IACAmC,UAAA,EAAY5B,gBAAA,CAAiBM,IAAI;IACjCuB,oBAAA,EAAsB;IACtBC,cAAA,EAAgB;EAClB;EAEA,oBACEC,KAAA,CAAC;IAAIC,SAAA,EAAU;4BACbC,IAAA,CAAC;gBAAIxC,GAAA,CAAIyC,CAAC,CAAC;qBACXD,IAAA,CAAC;gBAAGxC,GAAA,CAAIyC,CAAC,CAAC;qBACVD,IAAA,CAAC5C,qBAAA;MACCmC,cAAA,EAAgBL,qBAAA;MAChBZ,cAAA,EAAgBA,cAAA;MAChB4B,YAAA,EAAcZ,SAAA;MACdpB,iBAAA,EAAmBA,iBAAA;MACnBJ,QAAA,EAAUA;;;AAIlB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["buildFormState","React","getDocPreferences","getDocumentData","CreateFirstUserClient","CreateFirstUserView","initPageResult","locale","req","payload","collections","config","admin","user","userSlug","collectionConfig","auth","authOptions","loginWithUsername","data","collectionSlug","slug","docPreferences","baseFields","Object","fromEntries","fields","filter","f","name","map","create","read","update","docPermissionsForForm","delete","readVersions","state","formState","docPermissions","code","operation","renderAllFields","schemaPath","skipValidation","_jsxs","className","_jsx","t","initialState"],"sources":["../../../src/views/CreateFirstUser/index.tsx"],"sourcesContent":["import type {\n AdminViewServerProps,\n SanitizedDocumentPermissions,\n SanitizedFieldsPermissions,\n} from 'payload'\n\nimport { buildFormState } from '@payloadcms/ui/utilities/buildFormState'\nimport React from 'react'\n\nimport { getDocPreferences } from '../Document/getDocPreferences.js'\nimport { getDocumentData } from '../Document/getDocumentData.js'\nimport { CreateFirstUserClient } from './index.client.js'\nimport './index.scss'\n\nexport async function CreateFirstUserView({ initPageResult }: AdminViewServerProps) {\n const {\n locale,\n req,\n req: {\n payload: {\n collections,\n config: {\n admin: { user: userSlug },\n },\n },\n },\n } = initPageResult\n\n const collectionConfig = collections?.[userSlug]?.config\n const { auth: authOptions } = collectionConfig\n const loginWithUsername = authOptions.loginWithUsername\n\n // Fetch the data required for the view\n const data = await getDocumentData({\n collectionSlug: collectionConfig.slug,\n locale,\n payload: req.payload,\n req,\n user: req.user,\n })\n\n // Get document preferences\n const docPreferences = await getDocPreferences({\n collectionSlug: collectionConfig.slug,\n payload: req.payload,\n user: req.user,\n })\n\n const baseFields: SanitizedFieldsPermissions = Object.fromEntries(\n collectionConfig.fields\n .filter((f): f is { name: string } & typeof f => 'name' in f && typeof f.name === 'string')\n .map((f) => [f.name, { create: true, read: true, update: true }]),\n )\n\n // In create-first-user we should always allow all fields\n const docPermissionsForForm: SanitizedDocumentPermissions = {\n create: true,\n delete: true,\n fields: baseFields,\n read: true,\n readVersions: true,\n update: true,\n }\n\n // Build initial form state from data\n const { state: formState } = await buildFormState({\n collectionSlug: collectionConfig.slug,\n data,\n docPermissions: docPermissionsForForm,\n docPreferences,\n locale: locale?.code,\n operation: 'create',\n renderAllFields: true,\n req,\n schemaPath: collectionConfig.slug,\n skipValidation: true,\n })\n\n return (\n <div className=\"create-first-user\">\n <h1>{req.t('general:welcome')}</h1>\n <p>{req.t('authentication:beginCreateFirstUser')}</p>\n <CreateFirstUserClient\n docPermissions={docPermissionsForForm}\n docPreferences={docPreferences}\n initialState={formState}\n loginWithUsername={loginWithUsername}\n userSlug={userSlug}\n />\n </div>\n )\n}\n"],"mappings":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E;EACA,MAAMC,qBAAA,GAAsD;IAC1DH,MAAA,EAAQ;IACRI,MAAA,EAAQ;IACRT,MAAA,EAAQH,UAAA;IACRS,IAAA,EAAM;IACNI,YAAA,EAAc;IACdH,MAAA,EAAQ;EACV;EAEA;EACA,MAAM;IAAEI,KAAA,EAAOC;EAAS,CAAE,GAAG,MAAMtC,cAAA,CAAe;IAChDoB,cAAA,EAAgBL,gBAAA,CAAiBM,IAAI;IACrCF,IAAA;IACAoB,cAAA,EAAgBL,qBAAA;IAChBZ,cAAA;IACAf,MAAA,EAAQA,MAAA,EAAQiC,IAAA;IAChBC,SAAA,EAAW;IACXC,eAAA,EAAiB;IACjBlC,GAAA;IACAmC,UAAA,EAAY5B,gBAAA,CAAiBM,IAAI;IACjCuB,cAAA,EAAgB;EAClB;EAEA,oBACEC,KAAA,CAAC;IAAIC,SAAA,EAAU;4BACbC,IAAA,CAAC;gBAAIvC,GAAA,CAAIwC,CAAC,CAAC;qBACXD,IAAA,CAAC;gBAAGvC,GAAA,CAAIwC,CAAC,CAAC;qBACVD,IAAA,CAAC3C,qBAAA;MACCmC,cAAA,EAAgBL,qBAAA;MAChBZ,cAAA,EAAgBA,cAAA;MAChB2B,YAAA,EAAcX,SAAA;MACdpB,iBAAA,EAAmBA,iBAAA;MACnBJ,QAAA,EAAUA;;;AAIlB","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/next",
3
- "version": "3.56.0-canary.3",
3
+ "version": "3.56.0-internal.457de85",
4
4
  "homepage": "https://payloadcms.com",
5
5
  "repository": {
6
6
  "type": "git",
@@ -87,9 +87,9 @@
87
87
  "qs-esm": "7.0.2",
88
88
  "sass": "1.77.4",
89
89
  "uuid": "10.0.0",
90
- "@payloadcms/graphql": "3.56.0-canary.3",
91
- "@payloadcms/translations": "3.56.0-canary.3",
92
- "@payloadcms/ui": "3.56.0-canary.3"
90
+ "@payloadcms/graphql": "3.56.0-internal.457de85",
91
+ "@payloadcms/ui": "3.56.0-internal.457de85",
92
+ "@payloadcms/translations": "3.56.0-internal.457de85"
93
93
  },
94
94
  "devDependencies": {
95
95
  "@babel/cli": "7.27.2",
@@ -107,12 +107,12 @@
107
107
  "esbuild-sass-plugin": "3.3.1",
108
108
  "swc-plugin-transform-remove-imports": "4.0.4",
109
109
  "@payloadcms/eslint-config": "3.28.0",
110
- "payload": "3.56.0-canary.3"
110
+ "payload": "3.56.0-internal.457de85"
111
111
  },
112
112
  "peerDependencies": {
113
113
  "graphql": "^16.8.1",
114
114
  "next": "^15.2.3",
115
- "payload": "3.56.0-canary.3"
115
+ "payload": "3.56.0-internal.457de85"
116
116
  },
117
117
  "engines": {
118
118
  "node": "^18.20.2 || >=20.9.0"