payload 3.59.0-internal.0fe318f → 3.59.0-internal.1291b4e

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.
Files changed (49) hide show
  1. package/dist/admin/forms/Form.d.ts +2 -2
  2. package/dist/admin/forms/Form.js.map +1 -1
  3. package/dist/collections/config/types.d.ts +2 -2
  4. package/dist/collections/config/types.js.map +1 -1
  5. package/dist/collections/operations/findDistinct.d.ts.map +1 -1
  6. package/dist/collections/operations/findDistinct.js +2 -0
  7. package/dist/collections/operations/findDistinct.js.map +1 -1
  8. package/dist/config/types.d.ts +2 -2
  9. package/dist/config/types.js.map +1 -1
  10. package/dist/database/getLocalizedPaths.d.ts.map +1 -1
  11. package/dist/database/getLocalizedPaths.js +5 -0
  12. package/dist/database/getLocalizedPaths.js.map +1 -1
  13. package/dist/exports/shared.d.ts +0 -1
  14. package/dist/exports/shared.d.ts.map +1 -1
  15. package/dist/exports/shared.js +0 -1
  16. package/dist/exports/shared.js.map +1 -1
  17. package/dist/fields/config/types.d.ts +45 -45
  18. package/dist/fields/config/types.d.ts.map +1 -1
  19. package/dist/fields/config/types.js.map +1 -1
  20. package/dist/index.bundled.d.ts +56 -111
  21. package/dist/index.d.ts +0 -1
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +3 -2
  24. package/dist/index.js.map +1 -1
  25. package/dist/utilities/getFieldByPath.d.ts +4 -1
  26. package/dist/utilities/getFieldByPath.d.ts.map +1 -1
  27. package/dist/utilities/getFieldByPath.js +9 -1
  28. package/dist/utilities/getFieldByPath.js.map +1 -1
  29. package/dist/utilities/toKebabCase.d.ts +1 -1
  30. package/dist/utilities/toKebabCase.d.ts.map +1 -1
  31. package/dist/utilities/toKebabCase.js +1 -1
  32. package/dist/utilities/toKebabCase.js.map +1 -1
  33. package/package.json +2 -2
  34. package/dist/fields/baseFields/slug/countVersions.d.ts +0 -13
  35. package/dist/fields/baseFields/slug/countVersions.d.ts.map +0 -1
  36. package/dist/fields/baseFields/slug/countVersions.js +0 -31
  37. package/dist/fields/baseFields/slug/countVersions.js.map +0 -1
  38. package/dist/fields/baseFields/slug/generateSlug.d.ts +0 -7
  39. package/dist/fields/baseFields/slug/generateSlug.d.ts.map +0 -1
  40. package/dist/fields/baseFields/slug/generateSlug.js +0 -60
  41. package/dist/fields/baseFields/slug/generateSlug.js.map +0 -1
  42. package/dist/fields/baseFields/slug/index.d.ts +0 -60
  43. package/dist/fields/baseFields/slug/index.d.ts.map +0 -1
  44. package/dist/fields/baseFields/slug/index.js +0 -67
  45. package/dist/fields/baseFields/slug/index.js.map +0 -1
  46. package/dist/utilities/slugify.d.ts +0 -2
  47. package/dist/utilities/slugify.d.ts.map +0 -1
  48. package/dist/utilities/slugify.js +0 -3
  49. package/dist/utilities/slugify.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/database/getLocalizedPaths.ts"],"sourcesContent":["import type { PathToQuery } from './queryValidation/types.js'\n\nimport {\n type Field,\n fieldShouldBeLocalized,\n type FlattenedBlock,\n type FlattenedField,\n} from '../fields/config/types.js'\nimport { APIError, type Payload, type SanitizedCollectionConfig } from '../index.js'\n\nexport function getLocalizedPaths({\n collectionSlug,\n fields,\n globalSlug,\n incomingPath,\n locale,\n overrideAccess = false,\n parentIsLocalized,\n payload,\n}: {\n collectionSlug?: string\n fields: FlattenedField[]\n globalSlug?: string\n incomingPath: string\n locale?: string\n overrideAccess?: boolean\n /**\n * @todo make required in v4.0. Usually, you'd wanna pass this through\n */\n parentIsLocalized?: boolean\n payload: Payload\n}): PathToQuery[] {\n const pathSegments = incomingPath.split('.')\n const localizationConfig = payload.config.localization\n\n let paths: PathToQuery[] = [\n {\n collectionSlug,\n complete: false,\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n field: undefined,\n fields,\n globalSlug,\n invalid: false,\n parentIsLocalized: parentIsLocalized!,\n path: '',\n },\n ]\n\n for (let i = 0; i < pathSegments.length; i += 1) {\n const segment = pathSegments[i]\n\n const lastIncompletePath = paths.find(({ complete }) => !complete)\n\n if (lastIncompletePath) {\n const { path } = lastIncompletePath\n let currentPath = path ? `${path}.${segment}` : segment\n\n let fieldsToSearch: FlattenedField[]\n let _parentIsLocalized = parentIsLocalized\n\n let matchedField!: FlattenedField\n\n if (lastIncompletePath?.field?.type === 'blocks') {\n if (segment === 'blockType') {\n matchedField = {\n name: 'blockType',\n type: 'text',\n }\n } else {\n for (const _block of lastIncompletePath.field.blockReferences ??\n lastIncompletePath.field.blocks) {\n let block: FlattenedBlock\n if (typeof _block === 'string') {\n block = payload.blocks[_block]!\n } else {\n block = _block\n }\n\n matchedField = block.flattenedFields.find((field) => field.name === segment)!\n if (matchedField) {\n break\n }\n }\n }\n } else {\n if (lastIncompletePath?.field && 'flattenedFields' in lastIncompletePath.field) {\n fieldsToSearch = lastIncompletePath.field.flattenedFields\n } else {\n fieldsToSearch = lastIncompletePath.fields!\n }\n _parentIsLocalized = parentIsLocalized || lastIncompletePath.field?.localized\n\n matchedField = fieldsToSearch.find((field) => field.name === segment)!\n }\n\n lastIncompletePath.field = matchedField!\n\n if (currentPath === 'globalType' && globalSlug) {\n lastIncompletePath.path = currentPath\n lastIncompletePath.complete = true\n lastIncompletePath.field = {\n name: 'globalType',\n type: 'text',\n }\n\n return paths\n }\n\n if (currentPath === 'relationTo') {\n lastIncompletePath.path = currentPath\n lastIncompletePath.complete = true\n lastIncompletePath.field = {\n name: 'relationTo',\n type: 'select',\n options: Object.keys(payload.collections),\n }\n\n return paths\n }\n\n if (!matchedField && currentPath === 'id' && i === pathSegments.length - 1) {\n lastIncompletePath.path = currentPath\n const idField: Field = {\n name: 'id',\n type: payload.db.defaultIDType as 'text',\n }\n lastIncompletePath.field = idField\n lastIncompletePath.complete = true\n return paths\n }\n\n if (matchedField) {\n if ('hidden' in matchedField && matchedField.hidden && !overrideAccess) {\n lastIncompletePath.invalid = true\n }\n\n const nextSegment = pathSegments[i + 1]!\n const nextSegmentIsLocale =\n localizationConfig && localizationConfig.localeCodes.includes(nextSegment)\n\n if (nextSegmentIsLocale) {\n // Skip the next iteration, because it's a locale\n i += 1\n currentPath = `${currentPath}.${nextSegment}`\n } else if (\n localizationConfig &&\n fieldShouldBeLocalized({ field: matchedField, parentIsLocalized: _parentIsLocalized! })\n ) {\n currentPath = `${currentPath}.${locale}`\n }\n\n switch (matchedField.type) {\n case 'join':\n case 'relationship':\n case 'upload': {\n // If this is a polymorphic relation,\n // We only support querying directly (no nested querying)\n if (matchedField.type !== 'join' && typeof matchedField.relationTo !== 'string') {\n lastIncompletePath.path = pathSegments.join('.')\n if (![matchedField.name, 'relationTo', 'value'].includes(pathSegments.at(-1)!)) {\n lastIncompletePath.invalid = true\n } else {\n lastIncompletePath.complete = true\n }\n } else {\n lastIncompletePath.complete = true\n lastIncompletePath.path = currentPath!\n\n const nestedPathToQuery = pathSegments\n .slice(nextSegmentIsLocale ? i + 2 : i + 1)\n .join('.')\n\n if (nestedPathToQuery) {\n let relatedCollection: SanitizedCollectionConfig\n if (matchedField.type === 'join') {\n if (Array.isArray(matchedField.collection)) {\n throw new APIError('Not supported')\n }\n\n relatedCollection = payload.collections[matchedField.collection]!.config\n } else {\n relatedCollection = payload.collections[matchedField.relationTo as string]!.config\n }\n\n const remainingPaths = getLocalizedPaths({\n collectionSlug: relatedCollection.slug,\n fields: relatedCollection.flattenedFields,\n globalSlug,\n incomingPath: nestedPathToQuery,\n locale,\n parentIsLocalized: false,\n payload,\n })\n\n paths = [...paths, ...remainingPaths]\n }\n\n return paths\n }\n\n break\n }\n case 'json':\n case 'richText': {\n const upcomingSegments = pathSegments.slice(i + 1).join('.')\n lastIncompletePath.complete = true\n lastIncompletePath.path = upcomingSegments\n ? `${currentPath}.${upcomingSegments}`\n : currentPath!\n return paths\n }\n\n default: {\n if (i + 1 === pathSegments.length) {\n lastIncompletePath.complete = true\n }\n lastIncompletePath.path = currentPath!\n }\n }\n } else {\n lastIncompletePath.invalid = true\n lastIncompletePath.path = currentPath!\n return paths\n }\n }\n }\n\n return paths\n}\n"],"names":["fieldShouldBeLocalized","APIError","getLocalizedPaths","collectionSlug","fields","globalSlug","incomingPath","locale","overrideAccess","parentIsLocalized","payload","pathSegments","split","localizationConfig","config","localization","paths","complete","field","undefined","invalid","path","i","length","segment","lastIncompletePath","find","currentPath","fieldsToSearch","_parentIsLocalized","matchedField","type","name","_block","blockReferences","blocks","block","flattenedFields","localized","options","Object","keys","collections","idField","db","defaultIDType","hidden","nextSegment","nextSegmentIsLocale","localeCodes","includes","relationTo","join","at","nestedPathToQuery","slice","relatedCollection","Array","isArray","collection","remainingPaths","slug","upcomingSegments"],"mappings":"AAEA,SAEEA,sBAAsB,QAGjB,4BAA2B;AAClC,SAASC,QAAQ,QAAsD,cAAa;AAEpF,OAAO,SAASC,kBAAkB,EAChCC,cAAc,EACdC,MAAM,EACNC,UAAU,EACVC,YAAY,EACZC,MAAM,EACNC,iBAAiB,KAAK,EACtBC,iBAAiB,EACjBC,OAAO,EAaR;IACC,MAAMC,eAAeL,aAAaM,KAAK,CAAC;IACxC,MAAMC,qBAAqBH,QAAQI,MAAM,CAACC,YAAY;IAEtD,IAAIC,QAAuB;QACzB;YACEb;YACAc,UAAU;YACV,oFAAoF;YACpFC,OAAOC;YACPf;YACAC;YACAe,SAAS;YACTX,mBAAmBA;YACnBY,MAAM;QACR;KACD;IAED,IAAK,IAAIC,IAAI,GAAGA,IAAIX,aAAaY,MAAM,EAAED,KAAK,EAAG;QAC/C,MAAME,UAAUb,YAAY,CAACW,EAAE;QAE/B,MAAMG,qBAAqBT,MAAMU,IAAI,CAAC,CAAC,EAAET,QAAQ,EAAE,GAAK,CAACA;QAEzD,IAAIQ,oBAAoB;YACtB,MAAM,EAAEJ,IAAI,EAAE,GAAGI;YACjB,IAAIE,cAAcN,OAAO,GAAGA,KAAK,CAAC,EAAEG,SAAS,GAAGA;YAEhD,IAAII;YACJ,IAAIC,qBAAqBpB;YAEzB,IAAIqB;YAEJ,IAAIL,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AEA,OAAOA;AACT"}
1
+ {"version":3,"sources":["../../src/database/getLocalizedPaths.ts"],"sourcesContent":["import type { PathToQuery } from './queryValidation/types.js'\n\nimport {\n type Field,\n fieldShouldBeLocalized,\n type FlattenedBlock,\n type FlattenedField,\n} from '../fields/config/types.js'\nimport { APIError, type Payload, type SanitizedCollectionConfig } from '../index.js'\n\nexport function getLocalizedPaths({\n collectionSlug,\n fields,\n globalSlug,\n incomingPath,\n locale,\n overrideAccess = false,\n parentIsLocalized,\n payload,\n}: {\n collectionSlug?: string\n fields: FlattenedField[]\n globalSlug?: string\n incomingPath: string\n locale?: string\n overrideAccess?: boolean\n /**\n * @todo make required in v4.0. Usually, you'd wanna pass this through\n */\n parentIsLocalized?: boolean\n payload: Payload\n}): PathToQuery[] {\n const pathSegments = incomingPath.split('.')\n const localizationConfig = payload.config.localization\n\n let paths: PathToQuery[] = [\n {\n collectionSlug,\n complete: false,\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n field: undefined,\n fields,\n globalSlug,\n invalid: false,\n parentIsLocalized: parentIsLocalized!,\n path: '',\n },\n ]\n\n for (let i = 0; i < pathSegments.length; i += 1) {\n const segment = pathSegments[i]\n\n const lastIncompletePath = paths.find(({ complete }) => !complete)\n\n if (lastIncompletePath) {\n const { path } = lastIncompletePath\n let currentPath = path ? `${path}.${segment}` : segment\n\n let fieldsToSearch: FlattenedField[]\n let _parentIsLocalized = parentIsLocalized\n\n let matchedField!: FlattenedField\n\n if (lastIncompletePath?.field?.type === 'blocks') {\n if (segment === 'blockType') {\n matchedField = {\n name: 'blockType',\n type: 'text',\n }\n } else {\n for (const _block of lastIncompletePath.field.blockReferences ??\n lastIncompletePath.field.blocks) {\n let block: FlattenedBlock\n if (typeof _block === 'string') {\n block = payload.blocks[_block]!\n } else {\n block = _block\n }\n\n matchedField = block.flattenedFields.find((field) => field.name === segment)!\n if (matchedField) {\n break\n }\n }\n }\n } else {\n if (lastIncompletePath?.field && 'flattenedFields' in lastIncompletePath.field) {\n fieldsToSearch = lastIncompletePath.field.flattenedFields\n } else {\n fieldsToSearch = lastIncompletePath.fields!\n }\n _parentIsLocalized = parentIsLocalized || lastIncompletePath.field?.localized\n\n matchedField = fieldsToSearch.find((field) => field.name === segment)!\n }\n\n lastIncompletePath.field = matchedField!\n\n if (currentPath === 'globalType' && globalSlug) {\n lastIncompletePath.path = currentPath\n lastIncompletePath.complete = true\n lastIncompletePath.field = {\n name: 'globalType',\n type: 'text',\n }\n\n return paths\n }\n\n if (currentPath === 'relationTo') {\n lastIncompletePath.path = currentPath\n lastIncompletePath.complete = true\n lastIncompletePath.field = {\n name: 'relationTo',\n type: 'select',\n options: Object.keys(payload.collections),\n }\n\n return paths\n }\n\n if (!matchedField && currentPath === 'id' && i === pathSegments.length - 1) {\n lastIncompletePath.path = currentPath\n const idField: Field = {\n name: 'id',\n type: payload.db.defaultIDType as 'text',\n }\n lastIncompletePath.field = idField\n lastIncompletePath.complete = true\n return paths\n }\n\n if (matchedField) {\n if ('hidden' in matchedField && matchedField.hidden && !overrideAccess) {\n lastIncompletePath.invalid = true\n }\n\n const nextSegment = pathSegments[i + 1]!\n const nextSegmentIsLocale =\n localizationConfig && localizationConfig.localeCodes.includes(nextSegment)\n\n if (nextSegmentIsLocale) {\n // Skip the next iteration, because it's a locale\n i += 1\n currentPath = `${currentPath}.${nextSegment}`\n } else if (\n localizationConfig &&\n fieldShouldBeLocalized({ field: matchedField, parentIsLocalized: _parentIsLocalized! })\n ) {\n currentPath = `${currentPath}.${locale}`\n }\n\n switch (matchedField.type) {\n case 'join':\n case 'relationship':\n case 'upload': {\n // If this is a polymorphic relation,\n // We only support querying directly (no nested querying)\n if (matchedField.type !== 'join' && typeof matchedField.relationTo !== 'string') {\n lastIncompletePath.path = pathSegments.join('.')\n if (![matchedField.name, 'relationTo', 'value'].includes(pathSegments.at(-1)!)) {\n lastIncompletePath.invalid = true\n } else {\n lastIncompletePath.complete = true\n }\n } else {\n lastIncompletePath.complete = true\n lastIncompletePath.path = currentPath!\n\n const nestedPathToQuery = pathSegments\n .slice(nextSegmentIsLocale ? i + 2 : i + 1)\n .join('.')\n\n if (nestedPathToQuery) {\n let relatedCollection: SanitizedCollectionConfig\n if (matchedField.type === 'join') {\n if (Array.isArray(matchedField.collection)) {\n throw new APIError('Not supported')\n }\n\n relatedCollection = payload.collections[matchedField.collection]!.config\n } else {\n relatedCollection = payload.collections[matchedField.relationTo as string]!.config\n }\n\n const remainingPaths = getLocalizedPaths({\n collectionSlug: relatedCollection.slug,\n fields: relatedCollection.flattenedFields,\n globalSlug,\n incomingPath: nestedPathToQuery,\n locale,\n parentIsLocalized: false,\n payload,\n })\n\n paths = [...paths, ...remainingPaths]\n }\n\n return paths\n }\n\n break\n }\n case 'json':\n case 'richText': {\n const upcomingSegments = pathSegments.slice(i + 1).join('.')\n pathSegments.forEach((path) => {\n if (!/^\\w+(?:\\.\\w+)*$/.test(path)) {\n lastIncompletePath.invalid = true\n }\n })\n lastIncompletePath.complete = true\n lastIncompletePath.path = upcomingSegments\n ? `${currentPath}.${upcomingSegments}`\n : currentPath!\n return paths\n }\n\n default: {\n if (i + 1 === pathSegments.length) {\n lastIncompletePath.complete = true\n }\n lastIncompletePath.path = currentPath!\n }\n }\n } else {\n lastIncompletePath.invalid = true\n lastIncompletePath.path = currentPath!\n return paths\n }\n }\n }\n\n return paths\n}\n"],"names":["fieldShouldBeLocalized","APIError","getLocalizedPaths","collectionSlug","fields","globalSlug","incomingPath","locale","overrideAccess","parentIsLocalized","payload","pathSegments","split","localizationConfig","config","localization","paths","complete","field","undefined","invalid","path","i","length","segment","lastIncompletePath","find","currentPath","fieldsToSearch","_parentIsLocalized","matchedField","type","name","_block","blockReferences","blocks","block","flattenedFields","localized","options","Object","keys","collections","idField","db","defaultIDType","hidden","nextSegment","nextSegmentIsLocale","localeCodes","includes","relationTo","join","at","nestedPathToQuery","slice","relatedCollection","Array","isArray","collection","remainingPaths","slug","upcomingSegments","forEach","test"],"mappings":"AAEA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AAoB9C,QAAQgC,WAAW,CAACZ,aAAaqB,UAAU,CAAW,CAAErC,MAAM;oCACpF;oCAEA,MAAM8C,iBAAiB1D,kBAAkB;wCACvCC,gBAAgBqD,kBAAkBK,IAAI;wCACtCzD,QAAQoD,kBAAkBnB,eAAe;wCACzChC;wCACAC,cAAcgD;wCACd/C;wCACAE,mBAAmB;wCACnBC;oCACF;oCAEAM,QAAQ;2CAAIA;2CAAU4C;qCAAe;gCACvC;gCAEA,OAAO5C;4BACT;4BAEA;wBACF;oBACA,KAAK;oBACL,KAAK;wBAAY;4BACf,MAAM8C,mBAAmBnD,aAAa4C,KAAK,CAACjC,IAAI,GAAG8B,IAAI,CAAC;4BACxDzC,aAAaoD,OAAO,CAAC,CAAC1C;gCACpB,IAAI,CAAC,kBAAkB2C,IAAI,CAAC3C,OAAO;oCACjCI,mBAAmBL,OAAO,GAAG;gCAC/B;4BACF;4BACAK,mBAAmBR,QAAQ,GAAG;4BAC9BQ,mBAAmBJ,IAAI,GAAGyC,mBACtB,GAAGnC,YAAY,CAAC,EAAEmC,kBAAkB,GACpCnC;4BACJ,OAAOX;wBACT;oBAEA;wBAAS;4BACP,IAAIM,IAAI,MAAMX,aAAaY,MAAM,EAAE;gCACjCE,mBAAmBR,QAAQ,GAAG;4BAChC;4BACAQ,mBAAmBJ,IAAI,GAAGM;wBAC5B;gBACF;YACF,OAAO;gBACLF,mBAAmBL,OAAO,GAAG;gBAC7BK,mBAAmBJ,IAAI,GAAGM;gBAC1B,OAAOX;YACT;QACF;IACF;IAEA,OAAOA;AACT"}
@@ -39,7 +39,6 @@ export { hoistQueryParamsToAnd, mergeListSearchAndWhere, } from '../utilities/me
39
39
  export { reduceFieldsToValues } from '../utilities/reduceFieldsToValues.js';
40
40
  export { sanitizeUserDataForEmail } from '../utilities/sanitizeUserDataForEmail.js';
41
41
  export { setsAreEqual } from '../utilities/setsAreEqual.js';
42
- export { slugify } from '../utilities/slugify.js';
43
42
  export { toKebabCase } from '../utilities/toKebabCase.js';
44
43
  export { transformColumnsToPreferences, transformColumnsToSearchParams, } from '../utilities/transformColumnPreferences.js';
45
44
  export { transformWhereQuery } from '../utilities/transformWhereQuery.js';
@@ -1 +1 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/exports/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,4BAA4B,EAC5B,qBAAqB,EACrB,mBAAmB,EACnB,YAAY,GACb,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,wDAAwD,CAAA;AACzF,OAAO,EAAE,qBAAqB,EAAE,MAAM,6DAA6D,CAAA;AACnG,OAAO,EAAE,QAAQ,IAAI,kBAAkB,EAAE,MAAM,mCAAmC,CAAA;AAElF,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mDAAmD,CAAA;AAEpF,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,SAAS,EACT,gBAAgB,EAChB,yBAAyB,EACzB,cAAc,EACd,cAAc,EACd,sBAAsB,EACtB,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,wBAAwB,GACzB,MAAM,2BAA2B,CAAA;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,cAAc,0BAA0B,CAAA;AAExC,YAAY,EACV,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,EACtB,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,SAAS,GACV,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EAAE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wBAAwB,EAAE,MAAM,0CAA0C,CAAA;AAEnF,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAEzD,OAAO,EACL,6BAA6B,EAC7B,8BAA8B,GAC/B,MAAM,4CAA4C,CAAA;AAEnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AAEzE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAA;AACvE,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAA"}
@@ -38,7 +38,6 @@ export { hoistQueryParamsToAnd, mergeListSearchAndWhere } from '../utilities/mer
38
38
  export { reduceFieldsToValues } from '../utilities/reduceFieldsToValues.js';
39
39
  export { sanitizeUserDataForEmail } from '../utilities/sanitizeUserDataForEmail.js';
40
40
  export { setsAreEqual } from '../utilities/setsAreEqual.js';
41
- export { slugify } from '../utilities/slugify.js';
42
41
  export { toKebabCase } from '../utilities/toKebabCase.js';
43
42
  export { transformColumnsToPreferences, transformColumnsToSearchParams } from '../utilities/transformColumnPreferences.js';
44
43
  export { transformWhereQuery } from '../utilities/transformWhereQuery.js';
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/exports/shared.ts"],"sourcesContent":["export {\n generateCookie,\n generateExpiredPayloadCookie,\n generatePayloadCookie,\n getCookieExpiration,\n parseCookies,\n} from '../auth/cookies.js'\nexport { getLoginOptions } from '../auth/getLoginOptions.js'\nexport { addSessionToUser, removeExpiredSessions } from '../auth/sessions.js'\nexport { getFromImportMap } from '../bin/generateImportMap/utilities/getFromImportMap.js'\nexport { parsePayloadComponent } from '../bin/generateImportMap/utilities/parsePayloadComponent.js'\nexport { defaults as collectionDefaults } from '../collections/config/defaults.js'\n\nexport { serverProps } from '../config/types.js'\n\nexport { defaultTimezones } from '../fields/baseFields/timezone/defaultTimezones.js'\n\nexport {\n fieldAffectsData,\n fieldHasMaxDepth,\n fieldHasSubFields,\n fieldIsArrayType,\n fieldIsBlockType,\n fieldIsGroupType,\n fieldIsHiddenOrDisabled,\n fieldIsID,\n fieldIsLocalized,\n fieldIsPresentationalOnly,\n fieldIsSidebar,\n fieldIsVirtual,\n fieldShouldBeLocalized,\n fieldSupportsMany,\n groupHasName,\n optionIsObject,\n optionIsValue,\n optionsAreObjects,\n tabHasName,\n valueIsValueWithRelation,\n} from '../fields/config/types.js'\n\nexport { getFieldPaths } from '../fields/getFieldPaths.js'\nexport * from '../fields/validations.js'\n\nexport type {\n FolderBreadcrumb,\n FolderDocumentItemKey,\n FolderEnabledColection,\n FolderInterface,\n FolderOrDocument,\n GetFolderDataResult,\n Subfolder,\n} from '../folders/types.js'\n\nexport { buildFolderWhereConstraints } from '../folders/utils/buildFolderWhereConstraints.js'\nexport { formatFolderOrDocumentItem } from '../folders/utils/formatFolderOrDocumentItem.js'\nexport { validOperators, validOperatorSet } from '../types/constants.js'\n\nexport { formatFilesize } from '../uploads/formatFilesize.js'\n\nexport { isImage } from '../uploads/isImage.js'\nexport { appendUploadSelectFields } from '../utilities/appendUploadSelectFields.js'\nexport { combineWhereConstraints } from '../utilities/combineWhereConstraints.js'\n\nexport {\n deepCopyObject,\n deepCopyObjectComplex,\n deepCopyObjectSimple,\n deepCopyObjectSimpleWithoutReactComponents,\n} from '../utilities/deepCopyObject.js'\nexport {\n deepMerge,\n deepMergeWithCombinedArrays,\n deepMergeWithReactComponents,\n deepMergeWithSourceArrays,\n} from '../utilities/deepMerge.js'\n\nexport { extractID } from '../utilities/extractID.js'\n\nexport { flattenAllFields } from '../utilities/flattenAllFields.js'\nexport { flattenTopLevelFields } from '../utilities/flattenTopLevelFields.js'\nexport { formatAdminURL } from '../utilities/formatAdminURL.js'\nexport { formatLabels, toWords } from '../utilities/formatLabels.js'\n\nexport { getBestFitFromSizes } from '../utilities/getBestFitFromSizes.js'\nexport { getDataByPath } from '../utilities/getDataByPath.js'\nexport { getFieldPermissions } from '../utilities/getFieldPermissions.js'\nexport { getSafeRedirect } from '../utilities/getSafeRedirect.js'\n\nexport { getSelectMode } from '../utilities/getSelectMode.js'\n\nexport { getSiblingData } from '../utilities/getSiblingData.js'\n\nexport { getUniqueListBy } from '../utilities/getUniqueListBy.js'\n\nexport { isNextBuild } from '../utilities/isNextBuild.js'\n\nexport { isNumber } from '../utilities/isNumber.js'\n\nexport { isPlainObject } from '../utilities/isPlainObject.js'\n\nexport {\n isReactClientComponent,\n isReactComponentOrFunction,\n isReactServerComponentOrFunction,\n} from '../utilities/isReactComponent.js'\n\nexport {\n hoistQueryParamsToAnd,\n mergeListSearchAndWhere,\n} from '../utilities/mergeListSearchAndWhere.js'\n\nexport { reduceFieldsToValues } from '../utilities/reduceFieldsToValues.js'\n\nexport { sanitizeUserDataForEmail } from '../utilities/sanitizeUserDataForEmail.js'\n\nexport { setsAreEqual } from '../utilities/setsAreEqual.js'\n\nexport { slugify } from '../utilities/slugify.js'\n\nexport { toKebabCase } from '../utilities/toKebabCase.js'\n\nexport {\n transformColumnsToPreferences,\n transformColumnsToSearchParams,\n} from '../utilities/transformColumnPreferences.js'\n\nexport { transformWhereQuery } from '../utilities/transformWhereQuery.js'\n\nexport { unflatten } from '../utilities/unflatten.js'\nexport { validateMimeType } from '../utilities/validateMimeType.js'\nexport { validateWhereQuery } from '../utilities/validateWhereQuery.js'\nexport { wait } from '../utilities/wait.js'\nexport { wordBoundariesRegex } from '../utilities/wordBoundariesRegex.js'\nexport { versionDefaults } from '../versions/defaults.js'\n\nexport { deepMergeSimple } from '@payloadcms/translations/utilities'\n"],"names":["generateCookie","generateExpiredPayloadCookie","generatePayloadCookie","getCookieExpiration","parseCookies","getLoginOptions","addSessionToUser","removeExpiredSessions","getFromImportMap","parsePayloadComponent","defaults","collectionDefaults","serverProps","defaultTimezones","fieldAffectsData","fieldHasMaxDepth","fieldHasSubFields","fieldIsArrayType","fieldIsBlockType","fieldIsGroupType","fieldIsHiddenOrDisabled","fieldIsID","fieldIsLocalized","fieldIsPresentationalOnly","fieldIsSidebar","fieldIsVirtual","fieldShouldBeLocalized","fieldSupportsMany","groupHasName","optionIsObject","optionIsValue","optionsAreObjects","tabHasName","valueIsValueWithRelation","getFieldPaths","buildFolderWhereConstraints","formatFolderOrDocumentItem","validOperators","validOperatorSet","formatFilesize","isImage","appendUploadSelectFields","combineWhereConstraints","deepCopyObject","deepCopyObjectComplex","deepCopyObjectSimple","deepCopyObjectSimpleWithoutReactComponents","deepMerge","deepMergeWithCombinedArrays","deepMergeWithReactComponents","deepMergeWithSourceArrays","extractID","flattenAllFields","flattenTopLevelFields","formatAdminURL","formatLabels","toWords","getBestFitFromSizes","getDataByPath","getFieldPermissions","getSafeRedirect","getSelectMode","getSiblingData","getUniqueListBy","isNextBuild","isNumber","isPlainObject","isReactClientComponent","isReactComponentOrFunction","isReactServerComponentOrFunction","hoistQueryParamsToAnd","mergeListSearchAndWhere","reduceFieldsToValues","sanitizeUserDataForEmail","setsAreEqual","slugify","toKebabCase","transformColumnsToPreferences","transformColumnsToSearchParams","transformWhereQuery","unflatten","validateMimeType","validateWhereQuery","wait","wordBoundariesRegex","versionDefaults","deepMergeSimple"],"mappings":"AAAA,SACEA,cAAc,EACdC,4BAA4B,EAC5BC,qBAAqB,EACrBC,mBAAmB,EACnBC,YAAY,QACP,qBAAoB;AAC3B,SAASC,eAAe,QAAQ,6BAA4B;AAC5D,SAASC,gBAAgB,EAAEC,qBAAqB,QAAQ,sBAAqB;AAC7E,SAASC,gBAAgB,QAAQ,yDAAwD;AACzF,SAASC,qBAAqB,QAAQ,8DAA6D;AACnG,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EjE,SAASC,aAAa,QAAQ,gCAA+B;AAE7D,SAASC,cAAc,QAAQ,iCAAgC;AAE/D,SAASC,eAAe,QAAQ,kCAAiC;AAEjE,SAASC,WAAW,QAAQ,8BAA6B;AAEzD,SAASC,QAAQ,QAAQ,2BAA0B;AAEnD,SAASC,aAAa,QAAQ,gCAA+B;AAE7D,SACEC,sBAAsB,EACtBC,0BAA0B,EAC1BC,gCAAgC,QAC3B,mCAAkC;AAEzC,SACEC,qBAAqB,EACrBC,uBAAuB,QAClB,0CAAyC;AAEhD,SAASC,oBAAoB,QAAQ,uCAAsC;AAE3E,SAASC,wBAAwB,QAAQ,2CAA0C;AAEnF,SAASC,YAAY,QAAQ,+BAA8B;AAE3D,SAASC,OAAO,QAAQ,0BAAyB;AAEjD,SAASC,WAAW,QAAQ,8BAA6B;AAEzD,SACEC,6BAA6B,EAC7BC,8BAA8B,QACzB,6CAA4C;AAEnD,SAASC,mBAAmB,QAAQ,sCAAqC;AAEzE,SAASC,SAAS,QAAQ,4BAA2B;AACrD,SAASC,gBAAgB,QAAQ,mCAAkC;AACnE,SAASC,kBAAkB,QAAQ,qCAAoC;AACvE,SAASC,IAAI,QAAQ,uBAAsB;AAC3C,SAASC,mBAAmB,QAAQ,sCAAqC;AACzE,SAASC,eAAe,QAAQ,0BAAyB;AAEzD,SAASC,eAAe,QAAQ,qCAAoC"}
1
+ {"version":3,"sources":["../../src/exports/shared.ts"],"sourcesContent":["export {\n generateCookie,\n generateExpiredPayloadCookie,\n generatePayloadCookie,\n getCookieExpiration,\n parseCookies,\n} from '../auth/cookies.js'\nexport { getLoginOptions } from '../auth/getLoginOptions.js'\nexport { addSessionToUser, removeExpiredSessions } from '../auth/sessions.js'\nexport { getFromImportMap } from '../bin/generateImportMap/utilities/getFromImportMap.js'\nexport { parsePayloadComponent } from '../bin/generateImportMap/utilities/parsePayloadComponent.js'\nexport { defaults as collectionDefaults } from '../collections/config/defaults.js'\n\nexport { serverProps } from '../config/types.js'\n\nexport { defaultTimezones } from '../fields/baseFields/timezone/defaultTimezones.js'\n\nexport {\n fieldAffectsData,\n fieldHasMaxDepth,\n fieldHasSubFields,\n fieldIsArrayType,\n fieldIsBlockType,\n fieldIsGroupType,\n fieldIsHiddenOrDisabled,\n fieldIsID,\n fieldIsLocalized,\n fieldIsPresentationalOnly,\n fieldIsSidebar,\n fieldIsVirtual,\n fieldShouldBeLocalized,\n fieldSupportsMany,\n groupHasName,\n optionIsObject,\n optionIsValue,\n optionsAreObjects,\n tabHasName,\n valueIsValueWithRelation,\n} from '../fields/config/types.js'\n\nexport { getFieldPaths } from '../fields/getFieldPaths.js'\nexport * from '../fields/validations.js'\n\nexport type {\n FolderBreadcrumb,\n FolderDocumentItemKey,\n FolderEnabledColection,\n FolderInterface,\n FolderOrDocument,\n GetFolderDataResult,\n Subfolder,\n} from '../folders/types.js'\n\nexport { buildFolderWhereConstraints } from '../folders/utils/buildFolderWhereConstraints.js'\nexport { formatFolderOrDocumentItem } from '../folders/utils/formatFolderOrDocumentItem.js'\nexport { validOperators, validOperatorSet } from '../types/constants.js'\n\nexport { formatFilesize } from '../uploads/formatFilesize.js'\n\nexport { isImage } from '../uploads/isImage.js'\nexport { appendUploadSelectFields } from '../utilities/appendUploadSelectFields.js'\nexport { combineWhereConstraints } from '../utilities/combineWhereConstraints.js'\n\nexport {\n deepCopyObject,\n deepCopyObjectComplex,\n deepCopyObjectSimple,\n deepCopyObjectSimpleWithoutReactComponents,\n} from '../utilities/deepCopyObject.js'\nexport {\n deepMerge,\n deepMergeWithCombinedArrays,\n deepMergeWithReactComponents,\n deepMergeWithSourceArrays,\n} from '../utilities/deepMerge.js'\n\nexport { extractID } from '../utilities/extractID.js'\n\nexport { flattenAllFields } from '../utilities/flattenAllFields.js'\nexport { flattenTopLevelFields } from '../utilities/flattenTopLevelFields.js'\nexport { formatAdminURL } from '../utilities/formatAdminURL.js'\n\nexport { formatLabels, toWords } from '../utilities/formatLabels.js'\nexport { getBestFitFromSizes } from '../utilities/getBestFitFromSizes.js'\nexport { getDataByPath } from '../utilities/getDataByPath.js'\nexport { getFieldPermissions } from '../utilities/getFieldPermissions.js'\n\nexport { getSafeRedirect } from '../utilities/getSafeRedirect.js'\n\nexport { getSelectMode } from '../utilities/getSelectMode.js'\n\nexport { getSiblingData } from '../utilities/getSiblingData.js'\n\nexport { getUniqueListBy } from '../utilities/getUniqueListBy.js'\n\nexport { isNextBuild } from '../utilities/isNextBuild.js'\n\nexport { isNumber } from '../utilities/isNumber.js'\n\nexport { isPlainObject } from '../utilities/isPlainObject.js'\n\nexport {\n isReactClientComponent,\n isReactComponentOrFunction,\n isReactServerComponentOrFunction,\n} from '../utilities/isReactComponent.js'\n\nexport {\n hoistQueryParamsToAnd,\n mergeListSearchAndWhere,\n} from '../utilities/mergeListSearchAndWhere.js'\n\nexport { reduceFieldsToValues } from '../utilities/reduceFieldsToValues.js'\n\nexport { sanitizeUserDataForEmail } from '../utilities/sanitizeUserDataForEmail.js'\n\nexport { setsAreEqual } from '../utilities/setsAreEqual.js'\n\nexport { toKebabCase } from '../utilities/toKebabCase.js'\n\nexport {\n transformColumnsToPreferences,\n transformColumnsToSearchParams,\n} from '../utilities/transformColumnPreferences.js'\n\nexport { transformWhereQuery } from '../utilities/transformWhereQuery.js'\n\nexport { unflatten } from '../utilities/unflatten.js'\nexport { validateMimeType } from '../utilities/validateMimeType.js'\nexport { validateWhereQuery } from '../utilities/validateWhereQuery.js'\nexport { wait } from '../utilities/wait.js'\nexport { wordBoundariesRegex } from '../utilities/wordBoundariesRegex.js'\nexport { versionDefaults } from '../versions/defaults.js'\n\nexport { deepMergeSimple } from '@payloadcms/translations/utilities'\n"],"names":["generateCookie","generateExpiredPayloadCookie","generatePayloadCookie","getCookieExpiration","parseCookies","getLoginOptions","addSessionToUser","removeExpiredSessions","getFromImportMap","parsePayloadComponent","defaults","collectionDefaults","serverProps","defaultTimezones","fieldAffectsData","fieldHasMaxDepth","fieldHasSubFields","fieldIsArrayType","fieldIsBlockType","fieldIsGroupType","fieldIsHiddenOrDisabled","fieldIsID","fieldIsLocalized","fieldIsPresentationalOnly","fieldIsSidebar","fieldIsVirtual","fieldShouldBeLocalized","fieldSupportsMany","groupHasName","optionIsObject","optionIsValue","optionsAreObjects","tabHasName","valueIsValueWithRelation","getFieldPaths","buildFolderWhereConstraints","formatFolderOrDocumentItem","validOperators","validOperatorSet","formatFilesize","isImage","appendUploadSelectFields","combineWhereConstraints","deepCopyObject","deepCopyObjectComplex","deepCopyObjectSimple","deepCopyObjectSimpleWithoutReactComponents","deepMerge","deepMergeWithCombinedArrays","deepMergeWithReactComponents","deepMergeWithSourceArrays","extractID","flattenAllFields","flattenTopLevelFields","formatAdminURL","formatLabels","toWords","getBestFitFromSizes","getDataByPath","getFieldPermissions","getSafeRedirect","getSelectMode","getSiblingData","getUniqueListBy","isNextBuild","isNumber","isPlainObject","isReactClientComponent","isReactComponentOrFunction","isReactServerComponentOrFunction","hoistQueryParamsToAnd","mergeListSearchAndWhere","reduceFieldsToValues","sanitizeUserDataForEmail","setsAreEqual","toKebabCase","transformColumnsToPreferences","transformColumnsToSearchParams","transformWhereQuery","unflatten","validateMimeType","validateWhereQuery","wait","wordBoundariesRegex","versionDefaults","deepMergeSimple"],"mappings":"AAAA,SACEA,cAAc,EACdC,4BAA4B,EAC5BC,qBAAqB,EACrBC,mBAAmB,EACnBC,YAAY,QACP,qBAAoB;AAC3B,SAASC,eAAe,QAAQ,6BAA4B;AAC5D,SAASC,gBAAgB,EAAEC,qBAAqB,QAAQ,sBAAqB;AAC7E,SAASC,gBAAgB,QAAQ,yDAAwD;AACzF,SAASC,qBAAqB,QAAQ,8DAA6D;AACnG,SAASC,YAAYC,kBAAkB,QAAQ,oCAAmC;AAElF,SAASC,WAAW,QAAQ,qBAAoB;AAEhD,SAASC,gBAAgB,QAAQ,oDAAmD;AAEpF,SACEC,gBAAgB,EAChBC,gBAAgB,EAChBC,iBAAiB,EACjBC,gBAAgB,EAChBC,gBAAgB,EAChBC,gB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AA+B;AAE7D,SACEC,sBAAsB,EACtBC,0BAA0B,EAC1BC,gCAAgC,QAC3B,mCAAkC;AAEzC,SACEC,qBAAqB,EACrBC,uBAAuB,QAClB,0CAAyC;AAEhD,SAASC,oBAAoB,QAAQ,uCAAsC;AAE3E,SAASC,wBAAwB,QAAQ,2CAA0C;AAEnF,SAASC,YAAY,QAAQ,+BAA8B;AAE3D,SAASC,WAAW,QAAQ,8BAA6B;AAEzD,SACEC,6BAA6B,EAC7BC,8BAA8B,QACzB,6CAA4C;AAEnD,SAASC,mBAAmB,QAAQ,sCAAqC;AAEzE,SAASC,SAAS,QAAQ,4BAA2B;AACrD,SAASC,gBAAgB,QAAQ,mCAAkC;AACnE,SAASC,kBAAkB,QAAQ,qCAAoC;AACvE,SAASC,IAAI,QAAQ,uBAAsB;AAC3C,SAASC,mBAAmB,QAAQ,sCAAqC;AACzE,SAASC,eAAe,QAAQ,0BAAyB;AAEzD,SAASC,eAAe,QAAQ,qCAAoC"}
@@ -168,7 +168,7 @@ export type BlocksFilterOptionsProps<TData = any> = {
168
168
  id: number | string;
169
169
  } & Pick<FilterOptionsProps<TData>, 'data' | 'req' | 'siblingData' | 'user'>;
170
170
  export type BlocksFilterOptions<TData = any> = ((options: BlocksFilterOptionsProps<TData>) => BlockSlugOrString | Promise<BlockSlugOrString | true> | true) | BlockSlugOrString;
171
- export type FieldAdmin = {
171
+ type Admin = {
172
172
  className?: string;
173
173
  components?: {
174
174
  Cell?: PayloadComponent<DefaultServerCellComponentProps, DefaultCellComponentProps>;
@@ -306,7 +306,7 @@ export interface FieldBase {
306
306
  read?: FieldAccess;
307
307
  update?: FieldAccess;
308
308
  };
309
- admin?: FieldAdmin;
309
+ admin?: Admin;
310
310
  /** Extension point to add your custom data. Server only. */
311
311
  custom?: FieldCustom;
312
312
  defaultValue?: DefaultValue;
@@ -382,12 +382,12 @@ export type NumberField = {
382
382
  beforeInput?: CustomComponent[];
383
383
  Error?: CustomComponent<NumberFieldErrorClientComponent | NumberFieldErrorServerComponent>;
384
384
  Label?: CustomComponent<NumberFieldLabelClientComponent | NumberFieldLabelServerComponent>;
385
- } & FieldAdmin['components'];
385
+ } & Admin['components'];
386
386
  /** Set this property to define a placeholder string for the field. */
387
387
  placeholder?: Record<string, string> | string;
388
388
  /** Set a value for the number field to increment / decrement using browser controls. */
389
389
  step?: number;
390
- } & FieldAdmin;
390
+ } & Admin;
391
391
  /** Maximum value accepted. Used in the default `validate` function. */
392
392
  max?: number;
393
393
  /** Minimum value accepted. Used in the default `validate` function. */
@@ -421,10 +421,10 @@ export type TextField = {
421
421
  beforeInput?: CustomComponent[];
422
422
  Error?: CustomComponent<TextFieldErrorClientComponent | TextFieldErrorServerComponent>;
423
423
  Label?: CustomComponent<TextFieldLabelClientComponent | TextFieldLabelServerComponent>;
424
- } & FieldAdmin['components'];
424
+ } & Admin['components'];
425
425
  placeholder?: Record<string, string> | string;
426
426
  rtl?: boolean;
427
- } & FieldAdmin;
427
+ } & Admin;
428
428
  maxLength?: number;
429
429
  minLength?: number;
430
430
  type: 'text';
@@ -456,9 +456,9 @@ export type EmailField = {
456
456
  beforeInput?: CustomComponent[];
457
457
  Error?: CustomComponent<EmailFieldErrorClientComponent | EmailFieldErrorServerComponent>;
458
458
  Label?: CustomComponent<EmailFieldLabelClientComponent | EmailFieldLabelServerComponent>;
459
- } & FieldAdmin['components'];
459
+ } & Admin['components'];
460
460
  placeholder?: Record<string, string> | string;
461
- } & FieldAdmin;
461
+ } & Admin;
462
462
  type: 'email';
463
463
  validate?: EmailFieldValidation;
464
464
  } & Omit<FieldBase, 'validate'>;
@@ -472,11 +472,11 @@ export type TextareaField = {
472
472
  beforeInput?: CustomComponent[];
473
473
  Error?: CustomComponent<TextareaFieldErrorClientComponent | TextareaFieldErrorServerComponent>;
474
474
  Label?: CustomComponent<TextareaFieldLabelClientComponent | TextareaFieldLabelServerComponent>;
475
- } & FieldAdmin['components'];
475
+ } & Admin['components'];
476
476
  placeholder?: Record<string, string> | string;
477
477
  rows?: number;
478
478
  rtl?: boolean;
479
- } & FieldAdmin;
479
+ } & Admin;
480
480
  maxLength?: number;
481
481
  minLength?: number;
482
482
  type: 'textarea';
@@ -492,8 +492,8 @@ export type CheckboxField = {
492
492
  beforeInput?: CustomComponent[];
493
493
  Error?: CustomComponent<CheckboxFieldErrorClientComponent | CheckboxFieldErrorServerComponent>;
494
494
  Label?: CustomComponent<CheckboxFieldLabelClientComponent | CheckboxFieldLabelServerComponent>;
495
- } & FieldAdmin['components'];
496
- } & FieldAdmin;
495
+ } & Admin['components'];
496
+ } & Admin;
497
497
  type: 'checkbox';
498
498
  validate?: CheckboxFieldValidation;
499
499
  } & Omit<FieldBase, 'validate'>;
@@ -507,10 +507,10 @@ export type DateField = {
507
507
  beforeInput?: CustomComponent[];
508
508
  Error?: CustomComponent<DateFieldErrorClientComponent | DateFieldErrorServerComponent>;
509
509
  Label?: CustomComponent<DateFieldLabelClientComponent | DateFieldLabelServerComponent>;
510
- } & FieldAdmin['components'];
510
+ } & Admin['components'];
511
511
  date?: ConditionalDateProps;
512
512
  placeholder?: Record<string, string> | string;
513
- } & FieldAdmin;
513
+ } & Admin;
514
514
  /**
515
515
  * Enable timezone selection in the admin interface.
516
516
  */
@@ -527,9 +527,9 @@ export type GroupBase = {
527
527
  afterInput?: CustomComponent[];
528
528
  beforeInput?: CustomComponent[];
529
529
  Label?: CustomComponent<GroupFieldLabelClientComponent | GroupFieldLabelServerComponent>;
530
- } & FieldAdmin['components'];
530
+ } & Admin['components'];
531
531
  hideGutter?: boolean;
532
- } & FieldAdmin;
532
+ } & Admin;
533
533
  fields: Field[];
534
534
  type: 'group';
535
535
  validate?: Validate<unknown, unknown, unknown, GroupField>;
@@ -555,7 +555,7 @@ export type UnnamedGroupFieldClient = {
555
555
  export type NamedGroupFieldClient = Pick<NamedGroupField, 'name'> & UnnamedGroupFieldClient;
556
556
  export type GroupFieldClient = NamedGroupFieldClient | UnnamedGroupFieldClient;
557
557
  export type RowField = {
558
- admin?: Omit<FieldAdmin, 'description'>;
558
+ admin?: Omit<Admin, 'description'>;
559
559
  fields: Field[];
560
560
  type: 'row';
561
561
  } & Omit<FieldBase, 'admin' | 'hooks' | 'label' | 'localized' | 'name' | 'validate' | 'virtual'>;
@@ -572,9 +572,9 @@ export type CollapsibleField = {
572
572
  afterInput?: CustomComponent[];
573
573
  beforeInput?: CustomComponent[];
574
574
  Label: CustomComponent<CollapsibleFieldLabelClientComponent | CollapsibleFieldLabelServerComponent>;
575
- } & FieldAdmin['components'];
575
+ } & Admin['components'];
576
576
  initCollapsed?: boolean;
577
- } & FieldAdmin;
577
+ } & Admin;
578
578
  label?: Required<FieldBase['label']>;
579
579
  } | {
580
580
  admin?: {
@@ -582,9 +582,9 @@ export type CollapsibleField = {
582
582
  afterInput?: CustomComponent[];
583
583
  beforeInput?: CustomComponent[];
584
584
  Label?: CustomComponent<CollapsibleFieldLabelClientComponent | CollapsibleFieldLabelServerComponent>;
585
- } & FieldAdmin['components'];
585
+ } & Admin['components'];
586
586
  initCollapsed?: boolean;
587
- } & FieldAdmin;
587
+ } & Admin;
588
588
  label: Required<FieldBase['label']>;
589
589
  }) & Omit<FieldBase, 'hooks' | 'label' | 'localized' | 'name' | 'validate' | 'virtual'>;
590
590
  export type CollapsibleFieldClient = {
@@ -628,7 +628,7 @@ export type UnnamedTab = {
628
628
  } & Omit<TabBase, 'hooks' | 'name' | 'virtual'>;
629
629
  export type Tab = NamedTab | UnnamedTab;
630
630
  export type TabsField = {
631
- admin?: Omit<FieldAdmin, 'description'>;
631
+ admin?: Omit<Admin, 'description'>;
632
632
  type: 'tabs';
633
633
  } & {
634
634
  tabs: Tab[];
@@ -656,7 +656,7 @@ export type UIField = {
656
656
  * The Filter component has to be a client component
657
657
  */
658
658
  Filter?: PayloadComponent;
659
- } & FieldAdmin['components'];
659
+ } & Admin['components'];
660
660
  condition?: Condition;
661
661
  /** Extension point to add your custom data. Available in server and client. */
662
662
  custom?: Record<string, any>;
@@ -729,9 +729,9 @@ type UploadAdmin = {
729
729
  components?: {
730
730
  Error?: CustomComponent<RelationshipFieldErrorClientComponent | RelationshipFieldErrorServerComponent>;
731
731
  Label?: CustomComponent<RelationshipFieldLabelClientComponent | RelationshipFieldLabelServerComponent>;
732
- } & FieldAdmin['components'];
732
+ } & Admin['components'];
733
733
  isSortable?: boolean;
734
- } & FieldAdmin;
734
+ } & Admin;
735
735
  type UploadAdminClient = AdminClient & Pick<UploadAdmin, 'allowCreate' | 'isSortable'>;
736
736
  export type PolymorphicUploadField = {
737
737
  admin?: {
@@ -762,10 +762,10 @@ export type CodeField = {
762
762
  beforeInput?: CustomComponent[];
763
763
  Error?: CustomComponent<CodeFieldErrorClientComponent | CodeFieldErrorServerComponent>;
764
764
  Label?: CustomComponent<CodeFieldLabelClientComponent | CodeFieldLabelServerComponent>;
765
- } & FieldAdmin['components'];
765
+ } & Admin['components'];
766
766
  editorOptions?: EditorProps['options'];
767
767
  language?: string;
768
- } & FieldAdmin;
768
+ } & Admin;
769
769
  maxLength?: number;
770
770
  minLength?: number;
771
771
  type: 'code';
@@ -781,10 +781,10 @@ export type JSONField = {
781
781
  beforeInput?: CustomComponent[];
782
782
  Error?: CustomComponent<JSONFieldErrorClientComponent | JSONFieldErrorServerComponent>;
783
783
  Label?: CustomComponent<JSONFieldLabelClientComponent | JSONFieldLabelServerComponent>;
784
- } & FieldAdmin['components'];
784
+ } & Admin['components'];
785
785
  editorOptions?: EditorProps['options'];
786
786
  maxHeight?: number;
787
- } & FieldAdmin;
787
+ } & Admin;
788
788
  jsonSchema?: {
789
789
  fileMatch: string[];
790
790
  schema: JSONSchema4;
@@ -803,11 +803,11 @@ export type SelectField = {
803
803
  beforeInput?: CustomComponent[];
804
804
  Error?: CustomComponent<SelectFieldErrorClientComponent | SelectFieldErrorServerComponent>;
805
805
  Label?: CustomComponent<SelectFieldLabelClientComponent | SelectFieldLabelServerComponent>;
806
- } & FieldAdmin['components'];
806
+ } & Admin['components'];
807
807
  isClearable?: boolean;
808
808
  isSortable?: boolean;
809
809
  placeholder?: LabelFunction | string;
810
- } & FieldAdmin;
810
+ } & Admin;
811
811
  /**
812
812
  * Customize the SQL table name
813
813
  */
@@ -893,10 +893,10 @@ type RelationshipAdmin = {
893
893
  beforeInput?: CustomComponent[];
894
894
  Error?: CustomComponent<RelationshipFieldErrorClientComponent | RelationshipFieldErrorServerComponent>;
895
895
  Label?: CustomComponent<RelationshipFieldLabelClientComponent | RelationshipFieldLabelServerComponent>;
896
- } & FieldAdmin['components'];
896
+ } & Admin['components'];
897
897
  isSortable?: boolean;
898
898
  placeholder?: LabelFunction | string;
899
- } & FieldAdmin;
899
+ } & Admin;
900
900
  type RelationshipAdminClient = AdminClient & Pick<RelationshipAdmin, 'allowCreate' | 'allowEdit' | 'appearance' | 'isSortable' | 'placeholder'>;
901
901
  export type PolymorphicRelationshipField = {
902
902
  admin?: {
@@ -935,8 +935,8 @@ export type RichTextField<TValue extends object = any, TAdapterProps = any, TExt
935
935
  beforeInput?: CustomComponent[];
936
936
  Error?: CustomComponent;
937
937
  Label?: CustomComponent;
938
- } & FieldAdmin['components'];
939
- } & FieldAdmin;
938
+ } & Admin['components'];
939
+ } & Admin;
940
940
  editor?: RichTextAdapter<TValue, TAdapterProps, TExtraProperties> | RichTextAdapterProvider<TValue, TAdapterProps, TExtraProperties>;
941
941
  /**
942
942
  * Sets a maximum population depth for this field, regardless of the remaining depth when this field is reached.
@@ -955,13 +955,13 @@ export type ArrayField = {
955
955
  Error?: CustomComponent<ArrayFieldErrorClientComponent | ArrayFieldErrorServerComponent>;
956
956
  Label?: CustomComponent<ArrayFieldLabelClientComponent | ArrayFieldLabelServerComponent>;
957
957
  RowLabel?: RowLabelComponent;
958
- } & FieldAdmin['components'];
958
+ } & Admin['components'];
959
959
  initCollapsed?: boolean;
960
960
  /**
961
961
  * Disable drag and drop sorting
962
962
  */
963
963
  isSortable?: boolean;
964
- } & FieldAdmin;
964
+ } & Admin;
965
965
  /**
966
966
  * Customize the SQL table name
967
967
  */
@@ -992,9 +992,9 @@ export type RadioField = {
992
992
  beforeInput?: CustomComponent[];
993
993
  Error?: CustomComponent<RadioFieldErrorClientComponent | RadioFieldErrorServerComponent>;
994
994
  Label?: CustomComponent<RadioFieldLabelClientComponent | RadioFieldLabelServerComponent>;
995
- } & FieldAdmin['components'];
995
+ } & Admin['components'];
996
996
  layout?: 'horizontal' | 'vertical';
997
- } & FieldAdmin;
997
+ } & Admin;
998
998
  /**
999
999
  * Customize the SQL table name
1000
1000
  */
@@ -1144,13 +1144,13 @@ export type BlocksField = {
1144
1144
  beforeInput?: CustomComponent[];
1145
1145
  Error?: CustomComponent<BlocksFieldErrorClientComponent | BlocksFieldErrorServerComponent>;
1146
1146
  Label?: CustomComponent<BlocksFieldLabelClientComponent | BlocksFieldLabelServerComponent>;
1147
- } & FieldAdmin['components'];
1147
+ } & Admin['components'];
1148
1148
  initCollapsed?: boolean;
1149
1149
  /**
1150
1150
  * Disable drag and drop sorting
1151
1151
  */
1152
1152
  isSortable?: boolean;
1153
- } & FieldAdmin;
1153
+ } & Admin;
1154
1154
  /**
1155
1155
  * Like `blocks`, but allows you to also pass strings that are slugs of blocks defined in `config.blocks`.
1156
1156
  *
@@ -1213,10 +1213,10 @@ export type PointField = {
1213
1213
  beforeInput?: CustomComponent[];
1214
1214
  Error?: CustomComponent<PointFieldErrorClientComponent | PointFieldErrorServerComponent>;
1215
1215
  Label?: CustomComponent<PointFieldLabelClientComponent | PointFieldLabelServerComponent>;
1216
- } & FieldAdmin['components'];
1216
+ } & Admin['components'];
1217
1217
  placeholder?: Record<string, string> | string;
1218
1218
  step?: number;
1219
- } & FieldAdmin;
1219
+ } & Admin;
1220
1220
  type: 'point';
1221
1221
  validate?: PointFieldValidation;
1222
1222
  } & Omit<FieldBase, 'validate'>;
@@ -1239,12 +1239,12 @@ export type JoinField = {
1239
1239
  beforeInput?: CustomComponent[];
1240
1240
  Error?: CustomComponent<JoinFieldErrorClientComponent | JoinFieldErrorServerComponent>;
1241
1241
  Label?: CustomComponent<JoinFieldLabelClientComponent | JoinFieldLabelServerComponent>;
1242
- } & FieldAdmin['components'];
1242
+ } & Admin['components'];
1243
1243
  defaultColumns?: string[];
1244
1244
  disableBulkEdit?: never;
1245
1245
  disableRowTypes?: boolean;
1246
1246
  readOnly?: never;
1247
- } & FieldAdmin;
1247
+ } & Admin;
1248
1248
  /**
1249
1249
  * The slug of the collection to relate with.
1250
1250
  */