payload 3.0.0-beta.2 → 3.0.0-beta.4
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/admin/RichText.d.ts +2 -0
- package/dist/admin/RichText.d.ts.map +1 -1
- package/dist/admin/RichText.js.map +1 -1
- package/dist/admin/elements/PreviewButton.d.ts +2 -1
- package/dist/admin/elements/PreviewButton.d.ts.map +1 -1
- package/dist/admin/elements/PreviewButton.js.map +1 -1
- package/dist/admin/elements/PublishButton.d.ts +2 -1
- package/dist/admin/elements/PublishButton.d.ts.map +1 -1
- package/dist/admin/elements/PublishButton.js.map +1 -1
- package/dist/admin/elements/SaveButton.d.ts +2 -1
- package/dist/admin/elements/SaveButton.d.ts.map +1 -1
- package/dist/admin/elements/SaveButton.js.map +1 -1
- package/dist/admin/elements/SaveDraftButton.d.ts +2 -1
- package/dist/admin/elements/SaveDraftButton.d.ts.map +1 -1
- package/dist/admin/elements/SaveDraftButton.js.map +1 -1
- package/dist/admin/elements/WithServerSideProps.d.ts +5 -0
- package/dist/admin/elements/WithServerSideProps.d.ts.map +1 -0
- package/dist/admin/elements/WithServerSideProps.js +3 -0
- package/dist/admin/elements/WithServerSideProps.js.map +1 -0
- package/dist/admin/forms/FieldDescription.d.ts +4 -2
- package/dist/admin/forms/FieldDescription.d.ts.map +1 -1
- package/dist/admin/forms/FieldDescription.js.map +1 -1
- package/dist/admin/forms/RowLabel.d.ts +2 -1
- package/dist/admin/forms/RowLabel.d.ts.map +1 -1
- package/dist/admin/forms/RowLabel.js.map +1 -1
- package/dist/admin/types.d.ts +1 -0
- package/dist/admin/types.d.ts.map +1 -1
- package/dist/admin/types.js.map +1 -1
- package/dist/auth/executeAuthStrategies.d.ts +3 -2
- package/dist/auth/executeAuthStrategies.d.ts.map +1 -1
- package/dist/auth/executeAuthStrategies.js.map +1 -1
- package/dist/auth/getFieldsToSign.d.ts +2 -2
- package/dist/auth/getFieldsToSign.d.ts.map +1 -1
- package/dist/auth/getFieldsToSign.js.map +1 -1
- package/dist/auth/operations/auth.d.ts +3 -2
- package/dist/auth/operations/auth.d.ts.map +1 -1
- package/dist/auth/operations/auth.js.map +1 -1
- package/dist/bin/loader/index.d.ts.map +1 -1
- package/dist/bin/loader/index.js +4 -0
- package/dist/bin/loader/index.js.map +1 -1
- package/dist/collections/config/client.d.ts +11 -11
- package/dist/collections/config/types.d.ts +7 -6
- package/dist/collections/config/types.d.ts.map +1 -1
- package/dist/collections/config/types.js.map +1 -1
- package/dist/collections/dataloader.d.ts.map +1 -1
- package/dist/collections/dataloader.js +3 -5
- package/dist/collections/dataloader.js.map +1 -1
- package/dist/collections/operations/create.d.ts.map +1 -1
- package/dist/collections/operations/create.js +1 -4
- package/dist/collections/operations/create.js.map +1 -1
- package/dist/config/types.d.ts +20 -14
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/types.js +3 -0
- package/dist/config/types.js.map +1 -1
- package/dist/exports/utilities.d.ts +1 -2
- package/dist/exports/utilities.d.ts.map +1 -1
- package/dist/exports/utilities.js +1 -2
- package/dist/exports/utilities.js.map +1 -1
- package/dist/fields/config/client.d.ts +102 -102
- package/dist/fields/config/sanitize.spec.js +4 -1
- package/dist/fields/config/sanitize.spec.js.map +1 -1
- package/dist/fields/config/types.d.ts +45 -46
- package/dist/fields/config/types.d.ts.map +1 -1
- package/dist/fields/config/types.js.map +1 -1
- package/dist/fields/getDefaultValue.d.ts +2 -2
- package/dist/fields/getDefaultValue.d.ts.map +1 -1
- package/dist/fields/getDefaultValue.js.map +1 -1
- package/dist/fields/validations.d.ts +4 -4
- package/dist/fields/validations.d.ts.map +1 -1
- package/dist/fields/validations.js +5 -9
- package/dist/fields/validations.js.map +1 -1
- package/dist/fields/validations.spec.js +6 -1
- package/dist/fields/validations.spec.js.map +1 -1
- package/dist/globals/config/types.d.ts +1 -2
- package/dist/globals/config/types.d.ts.map +1 -1
- package/dist/globals/config/types.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/preferences/operations/update.d.ts +1 -1
- package/dist/preferences/types.d.ts +1 -2
- package/dist/preferences/types.d.ts.map +1 -1
- package/dist/preferences/types.js.map +1 -1
- package/dist/types/index.d.ts +4 -4
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/utilities/configToJSONSchema.d.ts.map +1 -1
- package/dist/utilities/configToJSONSchema.js +34 -1
- package/dist/utilities/configToJSONSchema.js.map +1 -1
- package/dist/utilities/isEntityHidden.d.ts +2 -2
- package/dist/utilities/isEntityHidden.d.ts.map +1 -1
- package/dist/utilities/isEntityHidden.js.map +1 -1
- package/dist/utilities/isReactComponent.d.ts +2 -0
- package/dist/utilities/isReactComponent.d.ts.map +1 -1
- package/dist/utilities/isReactComponent.js +8 -2
- package/dist/utilities/isReactComponent.js.map +1 -1
- package/dist/utilities/telemetry/events/adminInit.d.ts +2 -2
- package/dist/utilities/telemetry/events/adminInit.d.ts.map +1 -1
- package/dist/utilities/telemetry/events/adminInit.js.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +12 -0
- package/utilities.d.ts +1 -2
- package/utilities.js +1 -2
- package/dist/utilities/getIDType.d.ts +0 -4
- package/dist/utilities/getIDType.d.ts.map +0 -1
- package/dist/utilities/getIDType.js +0 -8
- package/dist/utilities/getIDType.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/fields/config/sanitize.spec.ts"],"sourcesContent":["import type {\n ArrayField,\n Block,\n BlockField,\n CheckboxField,\n Field,\n NumberField,\n TextField,\n} from './types'\nimport { Config } from '../../config/types'\nimport { InvalidFieldName, InvalidFieldRelationship, MissingFieldType } from '../../errors'\nimport { sanitizeFields } from './sanitize'\nimport type { BaseDatabaseAdapter } from '../../database/types.js'\n\nconst dummyConfig: Config = {\n collections: [],\n db: () => ({}) as BaseDatabaseAdapter,\n}\n\ndescribe('sanitizeFields', () => {\n it('should throw on missing type field', () => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const fields: Field[] = [\n {\n label: 'some-collection',\n name: 'Some Collection',\n },\n ]\n expect(() => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n sanitizeFields({\n config: dummyConfig,\n fields,\n validRelationships: [],\n })\n }).toThrow(MissingFieldType)\n })\n it('should throw on invalid field name', () => {\n const fields: Field[] = [\n {\n label: 'some.collection',\n name: 'some.collection',\n type: 'text',\n },\n ]\n expect(() => {\n sanitizeFields({\n config: dummyConfig,\n fields,\n validRelationships: [],\n })\n }).toThrow(InvalidFieldName)\n })\n\n describe('auto-labeling', () => {\n it('should populate label if missing', () => {\n const fields: Field[] = [\n {\n name: 'someField',\n type: 'text',\n },\n ]\n const sanitizedField = sanitizeFields({\n config: dummyConfig,\n fields,\n validRelationships: [],\n })[0] as TextField\n expect(sanitizedField.name).toStrictEqual('someField')\n expect(sanitizedField.label).toStrictEqual('Some Field')\n expect(sanitizedField.type).toStrictEqual('text')\n })\n it('should allow auto-label override', () => {\n const fields: Field[] = [\n {\n label: 'Do not label',\n name: 'someField',\n type: 'text',\n },\n ]\n const sanitizedField = sanitizeFields({\n config: dummyConfig,\n fields,\n validRelationships: [],\n })[0] as TextField\n expect(sanitizedField.name).toStrictEqual('someField')\n expect(sanitizedField.label).toStrictEqual('Do not label')\n expect(sanitizedField.type).toStrictEqual('text')\n })\n\n describe('opt-out', () => {\n it('should allow label opt-out', () => {\n const fields: Field[] = [\n {\n label: false,\n name: 'someField',\n type: 'text',\n },\n ]\n const sanitizedField = sanitizeFields({\n config: dummyConfig,\n fields,\n validRelationships: [],\n })[0] as TextField\n expect(sanitizedField.name).toStrictEqual('someField')\n expect(sanitizedField.label).toStrictEqual(false)\n expect(sanitizedField.type).toStrictEqual('text')\n })\n\n it('should allow label opt-out for arrays', () => {\n const arrayField: ArrayField = {\n fields: [\n {\n name: 'itemName',\n type: 'text',\n },\n ],\n label: false,\n name: 'items',\n type: 'array',\n }\n const sanitizedField = sanitizeFields({\n config: dummyConfig,\n fields: [arrayField],\n validRelationships: [],\n })[0] as ArrayField\n expect(sanitizedField.name).toStrictEqual('items')\n expect(sanitizedField.label).toStrictEqual(false)\n expect(sanitizedField.type).toStrictEqual('array')\n expect(sanitizedField.labels).toBeUndefined()\n })\n it('should allow label opt-out for blocks', () => {\n const fields: Field[] = [\n {\n blocks: [\n {\n fields: [\n {\n name: 'testNumber',\n type: 'number',\n },\n ],\n slug: 'number',\n },\n ],\n label: false,\n name: 'noLabelBlock',\n type: 'blocks',\n },\n ]\n const sanitizedField = sanitizeFields({\n config: dummyConfig,\n fields,\n validRelationships: [],\n })[0] as BlockField\n expect(sanitizedField.name).toStrictEqual('noLabelBlock')\n expect(sanitizedField.label).toStrictEqual(false)\n expect(sanitizedField.type).toStrictEqual('blocks')\n expect(sanitizedField.labels).toBeUndefined()\n })\n })\n\n it('should label arrays with plural and singular', () => {\n const fields: Field[] = [\n {\n fields: [\n {\n name: 'itemName',\n type: 'text',\n },\n ],\n name: 'items',\n type: 'array',\n },\n ]\n const sanitizedField = sanitizeFields({\n config: dummyConfig,\n fields,\n validRelationships: [],\n })[0] as ArrayField\n expect(sanitizedField.name).toStrictEqual('items')\n expect(sanitizedField.label).toStrictEqual('Items')\n expect(sanitizedField.type).toStrictEqual('array')\n expect(sanitizedField.labels).toMatchObject({ plural: 'Items', singular: 'Item' })\n })\n\n it('should label blocks with plural and singular', () => {\n const fields: Field[] = [\n {\n blocks: [\n {\n fields: [{ name: 'testNumber', type: 'number' }],\n slug: 'number',\n },\n ],\n name: 'specialBlock',\n type: 'blocks',\n },\n ]\n const sanitizedField = sanitizeFields({\n config: dummyConfig,\n fields,\n validRelationships: [],\n })[0] as BlockField\n expect(sanitizedField.name).toStrictEqual('specialBlock')\n expect(sanitizedField.label).toStrictEqual('Special Block')\n expect(sanitizedField.type).toStrictEqual('blocks')\n expect(sanitizedField.labels).toMatchObject({\n plural: 'Special Blocks',\n singular: 'Special Block',\n })\n expect((sanitizedField.blocks[0].fields[0] as NumberField).label).toStrictEqual('Test Number')\n })\n })\n\n describe('relationships', () => {\n it('should not throw on valid relationship', () => {\n const validRelationships = ['some-collection']\n const fields: Field[] = [\n {\n label: 'my-relationship',\n name: 'My Relationship',\n relationTo: 'some-collection',\n type: 'relationship',\n },\n ]\n expect(() => {\n sanitizeFields({ config: dummyConfig, fields, validRelationships })\n }).not.toThrow()\n })\n\n it('should not throw on valid relationship - multiple', () => {\n const validRelationships = ['some-collection', 'another-collection']\n const fields: Field[] = [\n {\n label: 'my-relationship',\n name: 'My Relationship',\n relationTo: ['some-collection', 'another-collection'],\n type: 'relationship',\n },\n ]\n expect(() => {\n sanitizeFields({ config: dummyConfig, fields, validRelationships })\n }).not.toThrow()\n })\n\n it('should not throw on valid relationship inside blocks', () => {\n const validRelationships = ['some-collection']\n const relationshipBlock: Block = {\n fields: [\n {\n label: 'my-relationship',\n name: 'My Relationship',\n relationTo: 'some-collection',\n type: 'relationship',\n },\n ],\n slug: 'relationshipBlock',\n }\n const fields: Field[] = [\n {\n blocks: [relationshipBlock],\n label: 'Layout Blocks',\n name: 'layout',\n type: 'blocks',\n },\n ]\n expect(() => {\n sanitizeFields({ config: dummyConfig, fields, validRelationships })\n }).not.toThrow()\n })\n\n it('should throw on invalid relationship', () => {\n const validRelationships = ['some-collection']\n const fields: Field[] = [\n {\n label: 'my-relationship',\n name: 'My Relationship',\n relationTo: 'not-valid',\n type: 'relationship',\n },\n ]\n expect(() => {\n sanitizeFields({ config: dummyConfig, fields, validRelationships })\n }).toThrow(InvalidFieldRelationship)\n })\n\n it('should throw on invalid relationship - multiple', () => {\n const validRelationships = ['some-collection', 'another-collection']\n const fields: Field[] = [\n {\n label: 'my-relationship',\n name: 'My Relationship',\n relationTo: ['some-collection', 'not-valid'],\n type: 'relationship',\n },\n ]\n expect(() => {\n sanitizeFields({ config: dummyConfig, fields, validRelationships })\n }).toThrow(InvalidFieldRelationship)\n })\n\n it('should throw on invalid relationship inside blocks', () => {\n const validRelationships = ['some-collection']\n const relationshipBlock: Block = {\n fields: [\n {\n label: 'my-relationship',\n name: 'My Relationship',\n relationTo: 'not-valid',\n type: 'relationship',\n },\n ],\n slug: 'relationshipBlock',\n }\n const fields: Field[] = [\n {\n blocks: [relationshipBlock],\n label: 'Layout Blocks',\n name: 'layout',\n type: 'blocks',\n },\n ]\n expect(() => {\n sanitizeFields({ config: dummyConfig, fields, validRelationships })\n }).toThrow(InvalidFieldRelationship)\n })\n\n it('should defaultValue of checkbox to false if required and undefined', () => {\n const fields: Field[] = [\n {\n name: 'My Checkbox',\n required: true,\n type: 'checkbox',\n },\n ]\n\n const sanitizedField = sanitizeFields({\n config: dummyConfig,\n fields,\n validRelationships: [],\n })[0] as CheckboxField\n expect(sanitizedField.defaultValue).toStrictEqual(false)\n })\n\n it('should return empty field array if no fields', () => {\n const sanitizedFields = sanitizeFields({\n config: dummyConfig,\n fields: [],\n validRelationships: [],\n })\n expect(sanitizedFields).toStrictEqual([])\n })\n })\n})\n"],"names":["InvalidFieldName","InvalidFieldRelationship","MissingFieldType","sanitizeFields","dummyConfig","collections","db","describe","it","fields","label","name","expect","config","validRelationships","toThrow","type","sanitizedField","toStrictEqual","arrayField","labels","toBeUndefined","blocks","slug","toMatchObject","plural","singular","relationTo","not","relationshipBlock","required","defaultValue","sanitizedFields"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,EAAE;gBACVK,oBAAoB,EAAE;YACxB;YACAF,OAAOoB,iBAAiBd,aAAa,CAAC,EAAE;QAC1C;IACF;AACF"}
|
|
1
|
+
{"version":3,"sources":["../../../src/fields/config/sanitize.spec.ts"],"sourcesContent":["import type {\n ArrayField,\n Block,\n BlockField,\n CheckboxField,\n Field,\n NumberField,\n TextField,\n} from './types'\nimport { Config } from '../../config/types'\nimport { InvalidFieldName, InvalidFieldRelationship, MissingFieldType } from '../../errors'\nimport { sanitizeFields } from './sanitize'\nimport type { BaseDatabaseAdapter } from '../../database/types.js'\n\nconst dummyConfig: Config = {\n collections: [],\n db: {\n defaultIDType: 'text',\n init: () => ({}) as BaseDatabaseAdapter['init'],\n } as BaseDatabaseAdapter,\n}\n\ndescribe('sanitizeFields', () => {\n it('should throw on missing type field', () => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const fields: Field[] = [\n {\n label: 'some-collection',\n name: 'Some Collection',\n },\n ]\n expect(() => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n sanitizeFields({\n config: dummyConfig,\n fields,\n validRelationships: [],\n })\n }).toThrow(MissingFieldType)\n })\n it('should throw on invalid field name', () => {\n const fields: Field[] = [\n {\n label: 'some.collection',\n name: 'some.collection',\n type: 'text',\n },\n ]\n expect(() => {\n sanitizeFields({\n config: dummyConfig,\n fields,\n validRelationships: [],\n })\n }).toThrow(InvalidFieldName)\n })\n\n describe('auto-labeling', () => {\n it('should populate label if missing', () => {\n const fields: Field[] = [\n {\n name: 'someField',\n type: 'text',\n },\n ]\n const sanitizedField = sanitizeFields({\n config: dummyConfig,\n fields,\n validRelationships: [],\n })[0] as TextField\n expect(sanitizedField.name).toStrictEqual('someField')\n expect(sanitizedField.label).toStrictEqual('Some Field')\n expect(sanitizedField.type).toStrictEqual('text')\n })\n it('should allow auto-label override', () => {\n const fields: Field[] = [\n {\n label: 'Do not label',\n name: 'someField',\n type: 'text',\n },\n ]\n const sanitizedField = sanitizeFields({\n config: dummyConfig,\n fields,\n validRelationships: [],\n })[0] as TextField\n expect(sanitizedField.name).toStrictEqual('someField')\n expect(sanitizedField.label).toStrictEqual('Do not label')\n expect(sanitizedField.type).toStrictEqual('text')\n })\n\n describe('opt-out', () => {\n it('should allow label opt-out', () => {\n const fields: Field[] = [\n {\n label: false,\n name: 'someField',\n type: 'text',\n },\n ]\n const sanitizedField = sanitizeFields({\n config: dummyConfig,\n fields,\n validRelationships: [],\n })[0] as TextField\n expect(sanitizedField.name).toStrictEqual('someField')\n expect(sanitizedField.label).toStrictEqual(false)\n expect(sanitizedField.type).toStrictEqual('text')\n })\n\n it('should allow label opt-out for arrays', () => {\n const arrayField: ArrayField = {\n fields: [\n {\n name: 'itemName',\n type: 'text',\n },\n ],\n label: false,\n name: 'items',\n type: 'array',\n }\n const sanitizedField = sanitizeFields({\n config: dummyConfig,\n fields: [arrayField],\n validRelationships: [],\n })[0] as ArrayField\n expect(sanitizedField.name).toStrictEqual('items')\n expect(sanitizedField.label).toStrictEqual(false)\n expect(sanitizedField.type).toStrictEqual('array')\n expect(sanitizedField.labels).toBeUndefined()\n })\n it('should allow label opt-out for blocks', () => {\n const fields: Field[] = [\n {\n blocks: [\n {\n fields: [\n {\n name: 'testNumber',\n type: 'number',\n },\n ],\n slug: 'number',\n },\n ],\n label: false,\n name: 'noLabelBlock',\n type: 'blocks',\n },\n ]\n const sanitizedField = sanitizeFields({\n config: dummyConfig,\n fields,\n validRelationships: [],\n })[0] as BlockField\n expect(sanitizedField.name).toStrictEqual('noLabelBlock')\n expect(sanitizedField.label).toStrictEqual(false)\n expect(sanitizedField.type).toStrictEqual('blocks')\n expect(sanitizedField.labels).toBeUndefined()\n })\n })\n\n it('should label arrays with plural and singular', () => {\n const fields: Field[] = [\n {\n fields: [\n {\n name: 'itemName',\n type: 'text',\n },\n ],\n name: 'items',\n type: 'array',\n },\n ]\n const sanitizedField = sanitizeFields({\n config: dummyConfig,\n fields,\n validRelationships: [],\n })[0] as ArrayField\n expect(sanitizedField.name).toStrictEqual('items')\n expect(sanitizedField.label).toStrictEqual('Items')\n expect(sanitizedField.type).toStrictEqual('array')\n expect(sanitizedField.labels).toMatchObject({ plural: 'Items', singular: 'Item' })\n })\n\n it('should label blocks with plural and singular', () => {\n const fields: Field[] = [\n {\n blocks: [\n {\n fields: [{ name: 'testNumber', type: 'number' }],\n slug: 'number',\n },\n ],\n name: 'specialBlock',\n type: 'blocks',\n },\n ]\n const sanitizedField = sanitizeFields({\n config: dummyConfig,\n fields,\n validRelationships: [],\n })[0] as BlockField\n expect(sanitizedField.name).toStrictEqual('specialBlock')\n expect(sanitizedField.label).toStrictEqual('Special Block')\n expect(sanitizedField.type).toStrictEqual('blocks')\n expect(sanitizedField.labels).toMatchObject({\n plural: 'Special Blocks',\n singular: 'Special Block',\n })\n expect((sanitizedField.blocks[0].fields[0] as NumberField).label).toStrictEqual('Test Number')\n })\n })\n\n describe('relationships', () => {\n it('should not throw on valid relationship', () => {\n const validRelationships = ['some-collection']\n const fields: Field[] = [\n {\n label: 'my-relationship',\n name: 'My Relationship',\n relationTo: 'some-collection',\n type: 'relationship',\n },\n ]\n expect(() => {\n sanitizeFields({ config: dummyConfig, fields, validRelationships })\n }).not.toThrow()\n })\n\n it('should not throw on valid relationship - multiple', () => {\n const validRelationships = ['some-collection', 'another-collection']\n const fields: Field[] = [\n {\n label: 'my-relationship',\n name: 'My Relationship',\n relationTo: ['some-collection', 'another-collection'],\n type: 'relationship',\n },\n ]\n expect(() => {\n sanitizeFields({ config: dummyConfig, fields, validRelationships })\n }).not.toThrow()\n })\n\n it('should not throw on valid relationship inside blocks', () => {\n const validRelationships = ['some-collection']\n const relationshipBlock: Block = {\n fields: [\n {\n label: 'my-relationship',\n name: 'My Relationship',\n relationTo: 'some-collection',\n type: 'relationship',\n },\n ],\n slug: 'relationshipBlock',\n }\n const fields: Field[] = [\n {\n blocks: [relationshipBlock],\n label: 'Layout Blocks',\n name: 'layout',\n type: 'blocks',\n },\n ]\n expect(() => {\n sanitizeFields({ config: dummyConfig, fields, validRelationships })\n }).not.toThrow()\n })\n\n it('should throw on invalid relationship', () => {\n const validRelationships = ['some-collection']\n const fields: Field[] = [\n {\n label: 'my-relationship',\n name: 'My Relationship',\n relationTo: 'not-valid',\n type: 'relationship',\n },\n ]\n expect(() => {\n sanitizeFields({ config: dummyConfig, fields, validRelationships })\n }).toThrow(InvalidFieldRelationship)\n })\n\n it('should throw on invalid relationship - multiple', () => {\n const validRelationships = ['some-collection', 'another-collection']\n const fields: Field[] = [\n {\n label: 'my-relationship',\n name: 'My Relationship',\n relationTo: ['some-collection', 'not-valid'],\n type: 'relationship',\n },\n ]\n expect(() => {\n sanitizeFields({ config: dummyConfig, fields, validRelationships })\n }).toThrow(InvalidFieldRelationship)\n })\n\n it('should throw on invalid relationship inside blocks', () => {\n const validRelationships = ['some-collection']\n const relationshipBlock: Block = {\n fields: [\n {\n label: 'my-relationship',\n name: 'My Relationship',\n relationTo: 'not-valid',\n type: 'relationship',\n },\n ],\n slug: 'relationshipBlock',\n }\n const fields: Field[] = [\n {\n blocks: [relationshipBlock],\n label: 'Layout Blocks',\n name: 'layout',\n type: 'blocks',\n },\n ]\n expect(() => {\n sanitizeFields({ config: dummyConfig, fields, validRelationships })\n }).toThrow(InvalidFieldRelationship)\n })\n\n it('should defaultValue of checkbox to false if required and undefined', () => {\n const fields: Field[] = [\n {\n name: 'My Checkbox',\n required: true,\n type: 'checkbox',\n },\n ]\n\n const sanitizedField = sanitizeFields({\n config: dummyConfig,\n fields,\n validRelationships: [],\n })[0] as CheckboxField\n expect(sanitizedField.defaultValue).toStrictEqual(false)\n })\n\n it('should return empty field array if no fields', () => {\n const sanitizedFields = sanitizeFields({\n config: dummyConfig,\n fields: [],\n validRelationships: [],\n })\n expect(sanitizedFields).toStrictEqual([])\n })\n })\n})\n"],"names":["InvalidFieldName","InvalidFieldRelationship","MissingFieldType","sanitizeFields","dummyConfig","collections","db","defaultIDType","init","describe","it","fields","label","name","expect","config","validRelationships","toThrow","type","sanitizedField","toStrictEqual","arrayField","labels","toBeUndefined","blocks","slug","toMatchObject","plural","singular","relationTo","not","relationshipBlock","required","defaultValue","sanitizedFields"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAUA,SAASA,gBAAgB,EAAEC,wBAAwB,EAAEC,gBAAgB,QAAQ,eAAc;AAC3F,SAASC,cAAc,QAAQ,aAAY;AAG3C,MAAMC,cAAsB;IAC1BC,aAAa,EAAE;IACfC,IAAI;QACFC,eAAe;QACfC,MAAM,IAAO,CAAA,CAAC,CAAA;IAChB;AACF;AAEAC,SAAS,kBAAkB;IACzBC,GAAG,sCAAsC;QACvC,6DAA6D;QAC7D,aAAa;QACb,MAAMC,SAAkB;YACtB;gBACEC,OAAO;gBACPC,MAAM;YACR;SACD;QACDC,OAAO;YACL,6DAA6D;YAC7D,aAAa;YACbX,eAAe;gBACbY,QAAQX;gBACRO;gBACAK,oBAAoB,EAAE;YACxB;QACF,GAAGC,OAAO,CAACf;IACb;IACAQ,GAAG,sCAAsC;QACvC,MAAMC,SAAkB;YACtB;gBACEC,OAAO;gBACPC,MAAM;gBACNK,MAAM;YACR;SACD;QACDJ,OAAO;YACLX,eAAe;gBACbY,QAAQX;gBACRO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AAMd,SAAkB;gBACtB;oBACEa,QAAQ;wBAACO;qBAAkB;oBAC3BnB,OAAO;oBACPC,MAAM;oBACNK,MAAM;gBACR;aACD;YACDJ,OAAO;gBACLX,eAAe;oBAAEY,QAAQX;oBAAaO;oBAAQK;gBAAmB;YACnE,GAAGC,OAAO,CAAChB;QACb;QAEAS,GAAG,sEAAsE;YACvE,MAAMC,SAAkB;gBACtB;oBACEE,MAAM;oBACNmB,UAAU;oBACVd,MAAM;gBACR;aACD;YAED,MAAMC,iBAAiBhB,eAAe;gBACpCY,QAAQX;gBACRO;gBACAK,oBAAoB,EAAE;YACxB,EAAE,CAAC,EAAE;YACLF,OAAOK,eAAec,YAAY,EAAEb,aAAa,CAAC;QACpD;QAEAV,GAAG,gDAAgD;YACjD,MAAMwB,kBAAkB/B,eAAe;gBACrCY,QAAQX;gBACRO,QAAQ,EAAE;gBACVK,oBAAoB,EAAE;YACxB;YACAF,OAAOoB,iBAAiBd,aAAa,CAAC,EAAE;QAC1C;IACF;AACF"}
|
|
@@ -2,9 +2,8 @@ import type { EditorProps } from '@monaco-editor/react';
|
|
|
2
2
|
import type { CSSProperties } from 'react';
|
|
3
3
|
import type React from 'react';
|
|
4
4
|
import type { ConditionalDateProps, Description, ErrorProps, LabelProps, RichTextAdapter, RowLabel } from '../../admin/types.js';
|
|
5
|
-
import type { User } from '../../auth/index.js';
|
|
6
5
|
import type { SanitizedCollectionConfig, TypeWithID } from '../../collections/config/types.js';
|
|
7
|
-
import type { LabelFunction } from '../../config/types.js';
|
|
6
|
+
import type { CustomComponent, LabelFunction } from '../../config/types.js';
|
|
8
7
|
import type { DBIdentifierName } from '../../database/types.js';
|
|
9
8
|
import type { SanitizedGlobalConfig } from '../../globals/config/types.js';
|
|
10
9
|
import type { Operation, PayloadRequest, RequestContext, Where } from '../../types/index.js';
|
|
@@ -60,7 +59,7 @@ export type FieldAccess<T extends TypeWithID = any, P = any, U = any> = (args: {
|
|
|
60
59
|
siblingData?: Partial<P>;
|
|
61
60
|
}) => Promise<boolean> | boolean;
|
|
62
61
|
export type Condition<T extends TypeWithID = any, P = any> = (data: Partial<T>, siblingData: Partial<P>, { user }: {
|
|
63
|
-
user:
|
|
62
|
+
user: PayloadRequest['user'];
|
|
64
63
|
}) => boolean;
|
|
65
64
|
export type FilterOptionsProps<T = any> = {
|
|
66
65
|
/**
|
|
@@ -82,14 +81,14 @@ export type FilterOptionsProps<T = any> = {
|
|
|
82
81
|
/**
|
|
83
82
|
* An object containing the currently authenticated user.
|
|
84
83
|
*/
|
|
85
|
-
user: Partial<
|
|
84
|
+
user: Partial<PayloadRequest['user']>;
|
|
86
85
|
};
|
|
87
86
|
export type FilterOptions<T = any> = ((options: FilterOptionsProps<T>) => Promise<Where | boolean> | Where | boolean) | Where | null;
|
|
88
87
|
type Admin = {
|
|
89
88
|
className?: string;
|
|
90
89
|
components?: {
|
|
91
|
-
Cell?:
|
|
92
|
-
Field?:
|
|
90
|
+
Cell?: CustomComponent;
|
|
91
|
+
Field?: CustomComponent;
|
|
93
92
|
Filter?: React.ComponentType<any>;
|
|
94
93
|
};
|
|
95
94
|
/**
|
|
@@ -160,10 +159,10 @@ export type NumberField = FieldBase & {
|
|
|
160
159
|
/** Set this property to a string that will be used for browser autocomplete. */
|
|
161
160
|
autoComplete?: string;
|
|
162
161
|
components?: {
|
|
163
|
-
Error?:
|
|
164
|
-
Label?:
|
|
165
|
-
afterInput?:
|
|
166
|
-
beforeInput?:
|
|
162
|
+
Error?: CustomComponent<ErrorProps>;
|
|
163
|
+
Label?: CustomComponent<LabelProps>;
|
|
164
|
+
afterInput?: CustomComponent[];
|
|
165
|
+
beforeInput?: CustomComponent[];
|
|
167
166
|
};
|
|
168
167
|
/** Set this property to define a placeholder string for the field. */
|
|
169
168
|
placeholder?: Record<string, string> | string;
|
|
@@ -194,10 +193,10 @@ export type TextField = FieldBase & {
|
|
|
194
193
|
admin?: Admin & {
|
|
195
194
|
autoComplete?: string;
|
|
196
195
|
components?: {
|
|
197
|
-
Error?:
|
|
198
|
-
Label?:
|
|
199
|
-
afterInput?:
|
|
200
|
-
beforeInput?:
|
|
196
|
+
Error?: CustomComponent<ErrorProps>;
|
|
197
|
+
Label?: CustomComponent<LabelProps>;
|
|
198
|
+
afterInput?: CustomComponent[];
|
|
199
|
+
beforeInput?: CustomComponent[];
|
|
201
200
|
};
|
|
202
201
|
placeholder?: Record<string, string> | string;
|
|
203
202
|
rtl?: boolean;
|
|
@@ -224,10 +223,10 @@ export type EmailField = FieldBase & {
|
|
|
224
223
|
admin?: Admin & {
|
|
225
224
|
autoComplete?: string;
|
|
226
225
|
components?: {
|
|
227
|
-
Error?:
|
|
228
|
-
Label?:
|
|
229
|
-
afterInput?:
|
|
230
|
-
beforeInput?:
|
|
226
|
+
Error?: CustomComponent<ErrorProps>;
|
|
227
|
+
Label?: CustomComponent<LabelProps>;
|
|
228
|
+
afterInput?: CustomComponent[];
|
|
229
|
+
beforeInput?: CustomComponent[];
|
|
231
230
|
};
|
|
232
231
|
placeholder?: Record<string, string> | string;
|
|
233
232
|
};
|
|
@@ -236,10 +235,10 @@ export type EmailField = FieldBase & {
|
|
|
236
235
|
export type TextareaField = FieldBase & {
|
|
237
236
|
admin?: Admin & {
|
|
238
237
|
components?: {
|
|
239
|
-
Error?:
|
|
240
|
-
Label?:
|
|
241
|
-
afterInput?:
|
|
242
|
-
beforeInput?:
|
|
238
|
+
Error?: CustomComponent<ErrorProps>;
|
|
239
|
+
Label?: CustomComponent<LabelProps>;
|
|
240
|
+
afterInput?: CustomComponent[];
|
|
241
|
+
beforeInput?: CustomComponent[];
|
|
243
242
|
};
|
|
244
243
|
placeholder?: Record<string, string> | string;
|
|
245
244
|
rows?: number;
|
|
@@ -252,10 +251,10 @@ export type TextareaField = FieldBase & {
|
|
|
252
251
|
export type CheckboxField = FieldBase & {
|
|
253
252
|
admin?: Admin & {
|
|
254
253
|
components?: {
|
|
255
|
-
Error?:
|
|
256
|
-
Label?:
|
|
257
|
-
afterInput?:
|
|
258
|
-
beforeInput?:
|
|
254
|
+
Error?: CustomComponent<ErrorProps>;
|
|
255
|
+
Label?: CustomComponent<LabelProps>;
|
|
256
|
+
afterInput?: CustomComponent[];
|
|
257
|
+
beforeInput?: CustomComponent[];
|
|
259
258
|
};
|
|
260
259
|
};
|
|
261
260
|
type: 'checkbox';
|
|
@@ -263,10 +262,10 @@ export type CheckboxField = FieldBase & {
|
|
|
263
262
|
export type DateField = FieldBase & {
|
|
264
263
|
admin?: Admin & {
|
|
265
264
|
components?: {
|
|
266
|
-
Error?:
|
|
267
|
-
Label?:
|
|
268
|
-
afterInput?:
|
|
269
|
-
beforeInput?:
|
|
265
|
+
Error?: CustomComponent<ErrorProps>;
|
|
266
|
+
Label?: CustomComponent<LabelProps>;
|
|
267
|
+
afterInput?: CustomComponent[];
|
|
268
|
+
beforeInput?: CustomComponent[];
|
|
270
269
|
};
|
|
271
270
|
date?: ConditionalDateProps;
|
|
272
271
|
placeholder?: Record<string, string> | string;
|
|
@@ -342,8 +341,8 @@ export type TabAsField = Tab & {
|
|
|
342
341
|
export type UIField = {
|
|
343
342
|
admin: {
|
|
344
343
|
components?: {
|
|
345
|
-
Cell?:
|
|
346
|
-
Field:
|
|
344
|
+
Cell?: CustomComponent;
|
|
345
|
+
Field: CustomComponent;
|
|
347
346
|
Filter?: React.ComponentType<any>;
|
|
348
347
|
};
|
|
349
348
|
condition?: Condition;
|
|
@@ -360,8 +359,8 @@ export type UIField = {
|
|
|
360
359
|
export type UploadField = FieldBase & {
|
|
361
360
|
admin?: {
|
|
362
361
|
components?: {
|
|
363
|
-
Error?:
|
|
364
|
-
Label?:
|
|
362
|
+
Error?: CustomComponent<ErrorProps>;
|
|
363
|
+
Label?: CustomComponent<LabelProps>;
|
|
365
364
|
};
|
|
366
365
|
};
|
|
367
366
|
filterOptions?: FilterOptions;
|
|
@@ -371,8 +370,8 @@ export type UploadField = FieldBase & {
|
|
|
371
370
|
};
|
|
372
371
|
type CodeAdmin = Admin & {
|
|
373
372
|
components?: {
|
|
374
|
-
Error?:
|
|
375
|
-
Label?:
|
|
373
|
+
Error?: CustomComponent<ErrorProps>;
|
|
374
|
+
Label?: CustomComponent<LabelProps>;
|
|
376
375
|
};
|
|
377
376
|
editorOptions?: EditorProps['options'];
|
|
378
377
|
language?: string;
|
|
@@ -385,8 +384,8 @@ export type CodeField = Omit<FieldBase, 'admin'> & {
|
|
|
385
384
|
};
|
|
386
385
|
type JSONAdmin = Admin & {
|
|
387
386
|
components?: {
|
|
388
|
-
Error?:
|
|
389
|
-
Label?:
|
|
387
|
+
Error?: CustomComponent<ErrorProps>;
|
|
388
|
+
Label?: CustomComponent<LabelProps>;
|
|
390
389
|
};
|
|
391
390
|
editorOptions?: EditorProps['options'];
|
|
392
391
|
};
|
|
@@ -397,8 +396,8 @@ export type JSONField = Omit<FieldBase, 'admin'> & {
|
|
|
397
396
|
export type SelectField = FieldBase & {
|
|
398
397
|
admin?: Admin & {
|
|
399
398
|
components?: {
|
|
400
|
-
Error?:
|
|
401
|
-
Label?:
|
|
399
|
+
Error?: CustomComponent<ErrorProps>;
|
|
400
|
+
Label?: CustomComponent<LabelProps>;
|
|
402
401
|
};
|
|
403
402
|
isClearable?: boolean;
|
|
404
403
|
isSortable?: boolean;
|
|
@@ -448,8 +447,8 @@ type SharedRelationshipProperties = FieldBase & {
|
|
|
448
447
|
type RelationshipAdmin = Admin & {
|
|
449
448
|
allowCreate?: boolean;
|
|
450
449
|
components?: {
|
|
451
|
-
Error?:
|
|
452
|
-
Label?:
|
|
450
|
+
Error?: CustomComponent<ErrorProps>;
|
|
451
|
+
Label?: CustomComponent<LabelProps>;
|
|
453
452
|
};
|
|
454
453
|
isSortable?: boolean;
|
|
455
454
|
};
|
|
@@ -477,8 +476,8 @@ export type RelationshipValue = (number | string)[] | ValueWithRelation | ValueW
|
|
|
477
476
|
export type RichTextField<Value extends object = any, AdapterProps = any, ExtraProperties = object> = FieldBase & {
|
|
478
477
|
admin?: Admin & {
|
|
479
478
|
components?: {
|
|
480
|
-
Error?:
|
|
481
|
-
Label?:
|
|
479
|
+
Error?: CustomComponent<ErrorProps>;
|
|
480
|
+
Label?: CustomComponent<LabelProps>;
|
|
482
481
|
};
|
|
483
482
|
};
|
|
484
483
|
editor?: RichTextAdapter<Value, AdapterProps, AdapterProps>;
|
|
@@ -514,8 +513,8 @@ export type ArrayField = FieldBase & {
|
|
|
514
513
|
export type RadioField = FieldBase & {
|
|
515
514
|
admin?: Admin & {
|
|
516
515
|
components?: {
|
|
517
|
-
Error?:
|
|
518
|
-
Label?:
|
|
516
|
+
Error?: CustomComponent<ErrorProps>;
|
|
517
|
+
Label?: CustomComponent<LabelProps>;
|
|
519
518
|
};
|
|
520
519
|
layout?: 'horizontal' | 'vertical';
|
|
521
520
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/fields/config/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAI1C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EACV,oBAAoB,EACpB,WAAW,EACX,UAAU,EACV,UAAU,EACV,eAAe,EACf,QAAQ,EACT,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,KAAK,EAAE,yBAAyB,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAC9F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AAC1E,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,KAAK,EAAE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AgB,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,UAAU,CAElE;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,YAAY,CAErE;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,IAAI,YAAY,EAAE,CAE9E;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,MAAM,CAE9D;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,aAAa,CAEtE;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,iBAAiB,CAIzE;AAED,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,iBAAiB,GAAG,KAAK,GAAG,UAAU,GAC5C,KAAK,IAAI,OAAO,CAElB;AAED,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,iBAAiB,GAAG,KAAK,GAAG,UAAU,GAC5C,KAAK,IAAI,kBAAkB,CAE7B;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,QAAQ,CAEpD;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,GAAG,GAAG,OAAO,CAE5D;AAED,MAAM,MAAM,QAAQ,GAChB,aAAa,GACb,WAAW,GACX,cAAc,GACd,YAAY,GACZ,gBAAgB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/fields/config/types.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable no-use-before-define */\nimport type { EditorProps } from '@monaco-editor/react'\nimport type { CSSProperties } from 'react'\n\n//eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport monacoeditor from 'monaco-editor' // IMPORTANT - DO NOT REMOVE: This is required for pnpm's default isolated mode to work - even though the import is not used. This is due to a typescript bug: https://github.com/microsoft/TypeScript/issues/47663#issuecomment-1519138189. (tsbugisolatedmode)\nimport type React from 'react'\n\nimport type {\n ConditionalDateProps,\n Description,\n ErrorProps,\n LabelProps,\n RichTextAdapter,\n RowLabel,\n} from '../../admin/types.js'\nimport type { User } from '../../auth/index.js'\nimport type { SanitizedCollectionConfig, TypeWithID } from '../../collections/config/types.js'\nimport type { LabelFunction } from '../../config/types.js'\nimport type { DBIdentifierName } from '../../database/types.js'\nimport type { SanitizedGlobalConfig } from '../../globals/config/types.js'\nimport type { Operation, PayloadRequest, RequestContext, Where } from '../../types/index.js'\nimport type { ClientFieldConfig } from './client.js'\n\nexport type FieldHookArgs<T extends TypeWithID = any, P = any, S = any> = {\n /** The collection which the field belongs to. If the field belongs to a global, this will be null. */\n collection: SanitizedCollectionConfig | null\n context: RequestContext\n /** The data passed to update the document within create and update operations, and the full document itself in the afterRead hook. */\n data?: Partial<T>\n /** The field which the hook is running against. */\n field: FieldAffectingData\n /** Boolean to denote if this hook is running against finding one, or finding many within the afterRead hook. */\n findMany?: boolean\n /** The global which the field belongs to. If the field belongs to a collection, this will be null. */\n global: SanitizedGlobalConfig | null\n /** A string relating to which operation the field type is currently executing within. Useful within beforeValidate, beforeChange, and afterChange hooks to differentiate between create and update operations. */\n operation?: 'create' | 'delete' | 'read' | 'update'\n /** The full original document in `update` operations. In the `afterChange` hook, this is the resulting document of the operation. */\n originalDoc?: T\n /** The document before changes were applied, only in `afterChange` hooks. */\n previousDoc?: T\n /** The sibling data of the document before changes being applied, only in `beforeChange` and `afterChange` hook. */\n previousSiblingDoc?: T\n /** The previous value of the field, before changes, only in `beforeChange` and `afterChange` hooks. */\n previousValue?: P\n /** The Express request object. It is mocked for Local API operations. */\n req: PayloadRequest\n /** The sibling data passed to a field that the hook is running against. */\n siblingData: Partial<S>\n /** The value of the field. */\n value?: P\n}\n\nexport type FieldHook<T extends TypeWithID = any, P = any, S = any> = (\n args: FieldHookArgs<T, P, S>,\n) => P | Promise<P>\n\nexport type FieldAccess<T extends TypeWithID = any, P = any, U = any> = (args: {\n /**\n * The incoming data used to `create` or `update` the document with. `data` is undefined during the `read` operation.\n */\n data?: Partial<T>\n /**\n * The original data of the document before the `update` is applied. `doc` is undefined during the `create` operation.\n */\n doc?: T\n /**\n * The `id` of the current document being read or updated. `id` is undefined during the `create` operation.\n */\n id?: number | string\n /** The `payload` object to interface with the payload API */\n req: PayloadRequest<U>\n /**\n * Immediately adjacent data to this field. For example, if this is a `group` field, then `siblingData` will be the other fields within the group.\n */\n siblingData?: Partial<P>\n}) => Promise<boolean> | boolean\n\nexport type Condition<T extends TypeWithID = any, P = any> = (\n data: Partial<T>,\n siblingData: Partial<P>,\n { user }: { user: User },\n) => boolean\n\nexport type FilterOptionsProps<T = any> = {\n /**\n * An object containing the full collection or global document currently being edited.\n */\n data: T\n /**\n * The `id` of the current document being edited. `id` is undefined during the `create` operation.\n */\n id: number | string\n /**\n * The collection `slug` to filter against, limited to this field's `relationTo` property.\n */\n relationTo: string\n /**\n * An object containing document data that is scoped to only fields within the same parent of this field.\n */\n siblingData: unknown\n /**\n * An object containing the currently authenticated user.\n */\n user: Partial<User>\n}\n\nexport type FilterOptions<T = any> =\n | ((options: FilterOptionsProps<T>) => Promise<Where | boolean> | Where | boolean)\n | Where\n | null\n\ntype Admin = {\n className?: string\n components?: {\n Cell?: React.ComponentType<any>\n Field?: React.ComponentType<any>\n Filter?: React.ComponentType<any>\n }\n /**\n * You can programmatically show / hide fields based on what other fields are doing.\n * This is also run on the server, to determine if the field should be validated.\n */\n condition?: Condition\n description?: Description\n disableBulkEdit?: boolean\n disabled?: boolean\n hidden?: boolean\n position?: 'sidebar'\n readOnly?: boolean\n style?: CSSProperties\n width?: string\n}\n\nexport type Labels = {\n plural: LabelFunction | Record<string, string> | string\n singular: LabelFunction | Record<string, string> | string\n}\n\nexport type BaseValidateOptions<TData, TSiblingData> = {\n data: Partial<TData>\n id?: number | string\n operation?: Operation\n req: PayloadRequest\n siblingData: Partial<TSiblingData>\n}\n\nexport type ValidateOptions<TData, TSiblingData, TFieldConfig extends object> = BaseValidateOptions<\n TData,\n TSiblingData\n> &\n TFieldConfig\n\nexport type Validate<\n TValue = any,\n TData = any,\n TSiblingData = any,\n TFieldConfig extends object = object,\n> = (\n value: TValue,\n options: ValidateOptions<TData, TSiblingData, TFieldConfig>,\n) => Promise<string | true> | string | true\n\nexport type ClientValidate = Omit<Validate, 'req'>\n\nexport type OptionObject = {\n label: LabelFunction | Record<string, string> | string\n value: string\n}\n\nexport type Option = OptionObject | string\n\nexport interface FieldBase {\n access?: {\n create?: FieldAccess\n read?: FieldAccess\n update?: FieldAccess\n }\n admin?: Admin\n /** Extension point to add your custom data. */\n custom?: Record<string, any>\n defaultValue?: any\n hidden?: boolean\n hooks?: {\n afterChange?: FieldHook[]\n afterRead?: FieldHook[]\n beforeChange?: FieldHook[]\n /**\n * Runs before a document is duplicated to prevent errors in unique fields or return null to use defaultValue.\n */\n beforeDuplicate?: FieldHook[]\n beforeValidate?: FieldHook[]\n }\n index?: boolean\n label?: LabelFunction | Record<string, string> | false | string\n localized?: boolean\n name: string\n required?: boolean\n saveToJWT?: boolean | string\n unique?: boolean\n validate?: Validate\n}\n\nexport type NumberField = FieldBase & {\n admin?: Admin & {\n /** Set this property to a string that will be used for browser autocomplete. */\n autoComplete?: string\n components?: {\n Error?: React.ComponentType<ErrorProps>\n Label?: React.ComponentType<LabelProps>\n afterInput?: React.ComponentType<any>[]\n beforeInput?: React.ComponentType<any>[]\n }\n /** Set this property to define a placeholder string for the field. */\n placeholder?: Record<string, string> | string\n /** Set a value for the number field to increment / decrement using browser controls. */\n step?: number\n }\n /** Maximum value accepted. Used in the default `validation` function. */\n max?: number\n /** Minimum value accepted. Used in the default `validation` function. */\n min?: number\n type: 'number'\n} & (\n | {\n /** Makes this field an ordered array of numbers instead of just a single number. */\n hasMany: true\n /** Maximum number of numbers in the numbers array, if `hasMany` is set to true. */\n maxRows?: number\n /** Minimum number of numbers in the numbers array, if `hasMany` is set to true. */\n minRows?: number\n }\n | {\n /** Makes this field an ordered array of numbers instead of just a single number. */\n hasMany?: false | undefined\n /** Maximum number of numbers in the numbers array, if `hasMany` is set to true. */\n maxRows?: undefined\n /** Minimum number of numbers in the numbers array, if `hasMany` is set to true. */\n minRows?: undefined\n }\n )\n\nexport type TextField = FieldBase & {\n admin?: Admin & {\n autoComplete?: string\n components?: {\n Error?: React.ComponentType<ErrorProps>\n Label?: React.ComponentType<LabelProps>\n afterInput?: React.ComponentType<any>[]\n beforeInput?: React.ComponentType<any>[]\n }\n placeholder?: Record<string, string> | string\n rtl?: boolean\n }\n maxLength?: number\n minLength?: number\n type: 'text'\n} & (\n | {\n /** Makes this field an ordered array of strings instead of just a single string. */\n hasMany: true\n /** Maximum number of strings in the strings array, if `hasMany` is set to true. */\n maxRows?: number\n /** Minimum number of strings in the strings array, if `hasMany` is set to true. */\n minRows?: number\n }\n | {\n /** Makes this field an ordered array of strings instead of just a single string. */\n hasMany?: false | undefined\n /** Maximum number of strings in the strings array, if `hasMany` is set to true. */\n maxRows?: undefined\n /** Minimum number of strings in the strings array, if `hasMany` is set to true. */\n minRows?: undefined\n }\n )\n\nexport type EmailField = FieldBase & {\n admin?: Admin & {\n autoComplete?: string\n components?: {\n Error?: React.ComponentType<ErrorProps>\n Label?: React.ComponentType<LabelProps>\n afterInput?: React.ComponentType<any>[]\n beforeInput?: React.ComponentType<any>[]\n }\n placeholder?: Record<string, string> | string\n }\n type: 'email'\n}\n\nexport type TextareaField = FieldBase & {\n admin?: Admin & {\n components?: {\n Error?: React.ComponentType<ErrorProps>\n Label?: React.ComponentType<LabelProps>\n afterInput?: React.ComponentType<any>[]\n beforeInput?: React.ComponentType<any>[]\n }\n placeholder?: Record<string, string> | string\n rows?: number\n rtl?: boolean\n }\n maxLength?: number\n minLength?: number\n type: 'textarea'\n}\n\nexport type CheckboxField = FieldBase & {\n admin?: Admin & {\n components?: {\n Error?: React.ComponentType<ErrorProps>\n Label?: React.ComponentType<LabelProps>\n afterInput?: React.ComponentType<any>[]\n beforeInput?: React.ComponentType<any>[]\n }\n }\n type: 'checkbox'\n}\n\nexport type DateField = FieldBase & {\n admin?: Admin & {\n components?: {\n Error?: React.ComponentType<ErrorProps>\n Label?: React.ComponentType<LabelProps>\n afterInput?: React.ComponentType<any>[]\n beforeInput?: React.ComponentType<any>[]\n }\n date?: ConditionalDateProps\n placeholder?: Record<string, string> | string\n }\n type: 'date'\n}\n\nexport type GroupField = Omit<FieldBase, 'required' | 'validation'> & {\n admin?: Admin & {\n hideGutter?: boolean\n }\n fields: Field[]\n /** Customize generated GraphQL and Typescript schema names.\n * By default it is bound to the collection.\n *\n * This is useful if you would like to generate a top level type to share amongst collections/fields.\n * **Note**: Top level types can collide, ensure they are unique among collections, arrays, groups, blocks, tabs.\n */\n interfaceName?: string\n type: 'group'\n}\n\nexport type RowAdmin = Omit<Admin, 'description'>\n\nexport type RowField = Omit<FieldBase, 'admin' | 'label' | 'name'> & {\n admin?: RowAdmin\n fields: Field[]\n type: 'row'\n}\n\nexport type CollapsibleField = Omit<FieldBase, 'label' | 'name'> & {\n admin?: Admin & {\n initCollapsed?: boolean\n }\n fields: Field[]\n label: RowLabel\n type: 'collapsible'\n}\n\nexport type TabsAdmin = Omit<Admin, 'description'>\n\ntype TabBase = Omit<FieldBase, 'required' | 'validation'> & {\n description?: Description\n fields: Field[]\n interfaceName?: string\n saveToJWT?: boolean | string\n}\n\nexport type NamedTab = TabBase & {\n /** Customize generated GraphQL and Typescript schema names.\n * The slug is used by default.\n *\n * This is useful if you would like to generate a top level type to share amongst collections/fields.\n * **Note**: Top level types can collide, ensure they are unique among collections, arrays, groups, blocks, tabs.\n */\n interfaceName?: string\n}\n\nexport type UnnamedTab = Omit<TabBase, 'name'> & {\n interfaceName?: never\n /**\n * Can be either:\n * - A string, which will be used as the tab's label.\n * - An object, where the key is the language code and the value is the label.\n */\n label:\n | {\n [selectedLanguage: string]: string\n }\n | LabelFunction\n | string\n localized?: never\n}\n\nexport type Tab = NamedTab | UnnamedTab\n\nexport type TabsField = Omit<FieldBase, 'admin' | 'localized' | 'name' | 'saveToJWT'> & {\n admin?: TabsAdmin\n tabs: Tab[]\n type: 'tabs'\n}\n\nexport type TabAsField = Tab & {\n name?: string\n type: 'tab'\n}\n\nexport type UIField = {\n admin: {\n components?: {\n Cell?: React.ComponentType<any>\n Field: React.ComponentType<any>\n Filter?: React.ComponentType<any>\n }\n condition?: Condition\n disableBulkEdit?: boolean\n position?: string\n width?: string\n }\n /** Extension point to add your custom data. */\n custom?: Record<string, any>\n label?: Record<string, string> | string\n name: string\n type: 'ui'\n}\n\nexport type UploadField = FieldBase & {\n admin?: {\n components?: {\n Error?: React.ComponentType<ErrorProps>\n Label?: React.ComponentType<LabelProps>\n }\n }\n filterOptions?: FilterOptions\n maxDepth?: number\n relationTo: string\n type: 'upload'\n}\n\ntype CodeAdmin = Admin & {\n components?: {\n Error?: React.ComponentType<ErrorProps>\n Label?: React.ComponentType<LabelProps>\n }\n editorOptions?: EditorProps['options']\n language?: string\n}\n\nexport type CodeField = Omit<FieldBase, 'admin'> & {\n admin?: CodeAdmin\n maxLength?: number\n minLength?: number\n type: 'code'\n}\n\ntype JSONAdmin = Admin & {\n components?: {\n Error?: React.ComponentType<ErrorProps>\n Label?: React.ComponentType<LabelProps>\n }\n editorOptions?: EditorProps['options']\n}\n\nexport type JSONField = Omit<FieldBase, 'admin'> & {\n admin?: JSONAdmin\n type: 'json'\n}\n\nexport type SelectField = FieldBase & {\n admin?: Admin & {\n components?: {\n Error?: React.ComponentType<ErrorProps>\n Label?: React.ComponentType<LabelProps>\n }\n isClearable?: boolean\n isSortable?: boolean\n }\n /**\n * Customize the SQL table name\n */\n dbName?: DBIdentifierName\n /**\n * Customize the DB enum name\n */\n enumName?: DBIdentifierName\n hasMany?: boolean\n options: Option[]\n type: 'select'\n}\n\ntype SharedRelationshipProperties = FieldBase & {\n filterOptions?: FilterOptions\n hasMany?: boolean\n maxDepth?: number\n type: 'relationship'\n} & (\n | {\n hasMany: true\n /**\n * @deprecated Use 'maxRows' instead\n */\n max?: number\n maxRows?: number\n /**\n * @deprecated Use 'minRows' instead\n */\n min?: number\n minRows?: number\n }\n | {\n hasMany?: false | undefined\n /**\n * @deprecated Use 'maxRows' instead\n */\n max?: undefined\n maxRows?: undefined\n /**\n * @deprecated Use 'minRows' instead\n */\n min?: undefined\n minRows?: undefined\n }\n )\n\ntype RelationshipAdmin = Admin & {\n allowCreate?: boolean\n components?: {\n Error?: React.ComponentType<ErrorProps>\n Label?: React.ComponentType<LabelProps>\n }\n isSortable?: boolean\n}\nexport type PolymorphicRelationshipField = SharedRelationshipProperties & {\n admin?: RelationshipAdmin & {\n sortOptions?: { [collectionSlug: string]: string }\n }\n relationTo: string[]\n}\nexport type SingleRelationshipField = SharedRelationshipProperties & {\n admin?: RelationshipAdmin & {\n sortOptions?: string\n }\n relationTo: string\n}\nexport type RelationshipField = PolymorphicRelationshipField | SingleRelationshipField\n\nexport type ValueWithRelation = {\n relationTo: string\n value: number | string\n}\n\nexport function valueIsValueWithRelation(value: unknown): value is ValueWithRelation {\n return value !== null && typeof value === 'object' && 'relationTo' in value && 'value' in value\n}\n\nexport type RelationshipValue =\n | (number | string)[]\n | ValueWithRelation\n | ValueWithRelation[]\n | (number | string)\n\nexport type RichTextField<\n Value extends object = any,\n AdapterProps = any,\n ExtraProperties = object,\n> = FieldBase & {\n admin?: Admin & {\n components?: {\n Error?: React.ComponentType<ErrorProps>\n Label?: React.ComponentType<LabelProps>\n }\n }\n editor?: RichTextAdapter<Value, AdapterProps, AdapterProps>\n type: 'richText'\n} & ExtraProperties\n\nexport type RichTextFieldRequiredEditor<\n Value extends object = any,\n AdapterProps = any,\n ExtraProperties = object,\n> = Omit<RichTextField<Value, AdapterProps, ExtraProperties>, 'editor'> & {\n editor: RichTextAdapter<Value, AdapterProps, ExtraProperties>\n}\n\nexport type ArrayField = FieldBase & {\n admin?: Admin & {\n components?: {\n RowLabel?: RowLabel\n } & Admin['components']\n initCollapsed?: boolean\n }\n /**\n * Customize the SQL table name\n */\n dbName?: DBIdentifierName\n fields: Field[]\n /** Customize generated GraphQL and Typescript schema names.\n * By default it is bound to the collection.\n *\n * This is useful if you would like to generate a top level type to share amongst collections/fields.\n * **Note**: Top level types can collide, ensure they are unique among collections, arrays, groups, blocks, tabs.\n */\n interfaceName?: string\n labels?: Labels\n maxRows?: number\n minRows?: number\n type: 'array'\n}\n\nexport type RadioField = FieldBase & {\n admin?: Admin & {\n components?: {\n Error?: React.ComponentType<ErrorProps>\n Label?: React.ComponentType<LabelProps>\n }\n layout?: 'horizontal' | 'vertical'\n }\n /**\n * Customize the SQL table name\n */\n dbName?: DBIdentifierName\n /**\n * Customize the DB enum name\n */\n enumName?: DBIdentifierName\n options: Option[]\n type: 'radio'\n}\n\nexport type Block = {\n /** Extension point to add your custom data. */\n custom?: Record<string, any>\n /**\n * Customize the SQL table name\n */\n dbName?: DBIdentifierName\n fields: Field[]\n /** @deprecated - please migrate to the interfaceName property instead. */\n graphQL?: {\n singularName?: string\n }\n imageAltText?: string\n imageURL?: string\n /** Customize generated GraphQL and Typescript schema names.\n * The slug is used by default.\n *\n * This is useful if you would like to generate a top level type to share amongst collections/fields.\n * **Note**: Top level types can collide, ensure they are unique among collections, arrays, groups, blocks, tabs.\n */\n interfaceName?: string\n labels?: Labels\n slug: string\n}\n\nexport type BlockField = FieldBase & {\n admin?: Admin & {\n initCollapsed?: boolean\n }\n blocks: Block[]\n defaultValue?: unknown\n labels?: Labels\n maxRows?: number\n minRows?: number\n type: 'blocks'\n}\n\nexport type PointField = FieldBase & {\n type: 'point'\n}\n\nexport type Field =\n | ArrayField\n | BlockField\n | CheckboxField\n | CodeField\n | CollapsibleField\n | DateField\n | EmailField\n | GroupField\n | JSONField\n | NumberField\n | PointField\n | RadioField\n | RelationshipField\n | RichTextField\n | RowField\n | SelectField\n | TabsField\n | TextField\n | TextareaField\n | UIField\n | UploadField\n\nexport type FieldWithRichTextRequiredEditor =\n | Exclude<Field, RichTextField>\n | RichTextFieldRequiredEditor\n\nexport type FieldAffectingData =\n | ArrayField\n | BlockField\n | CheckboxField\n | CodeField\n | DateField\n | EmailField\n | GroupField\n | JSONField\n | NumberField\n | PointField\n | RadioField\n | RelationshipField\n | RichTextField\n | SelectField\n | TabAsField\n | TextField\n | TextareaField\n | UploadField\n\nexport type NonPresentationalField =\n | ArrayField\n | BlockField\n | CheckboxField\n | CodeField\n | CollapsibleField\n | DateField\n | EmailField\n | GroupField\n | JSONField\n | NumberField\n | PointField\n | RadioField\n | RelationshipField\n | RichTextField\n | RowField\n | SelectField\n | TabsField\n | TextField\n | TextareaField\n | UploadField\n\nexport type FieldWithPath = Field & {\n path?: string\n}\n\nexport type FieldWithSubFields = ArrayField | CollapsibleField | GroupField | RowField\n\nexport type FieldPresentationalOnly = UIField\n\nexport type FieldWithMany = RelationshipField | SelectField\n\nexport type FieldWithMaxDepth = RelationshipField | UploadField\n\nexport function fieldHasSubFields(field: ClientFieldConfig | Field): field is FieldWithSubFields {\n return (\n field.type === 'group' ||\n field.type === 'array' ||\n field.type === 'row' ||\n field.type === 'collapsible'\n )\n}\n\nexport function fieldIsArrayType(field: Field): field is ArrayField {\n return field.type === 'array'\n}\n\nexport function fieldIsBlockType(field: Field): field is BlockField {\n return field.type === 'blocks'\n}\n\nexport function fieldIsGroupType(field: Field): field is GroupField {\n return field.type === 'group'\n}\n\nexport function optionIsObject(option: Option): option is OptionObject {\n return typeof option === 'object'\n}\n\nexport function optionsAreObjects(options: Option[]): options is OptionObject[] {\n return Array.isArray(options) && typeof options?.[0] === 'object'\n}\n\nexport function optionIsValue(option: Option): option is string {\n return typeof option === 'string'\n}\n\nexport function fieldSupportsMany(field: Field): field is FieldWithMany {\n return field.type === 'select' || field.type === 'relationship'\n}\n\nexport function fieldHasMaxDepth(field: Field): field is FieldWithMaxDepth {\n return (\n (field.type === 'upload' || field.type === 'relationship') && typeof field.maxDepth === 'number'\n )\n}\n\nexport function fieldIsPresentationalOnly(\n field: ClientFieldConfig | Field | TabAsField,\n): field is UIField {\n return field.type === 'ui'\n}\n\nexport function fieldAffectsData(\n field: ClientFieldConfig | Field | TabAsField,\n): field is FieldAffectingData {\n return 'name' in field && !fieldIsPresentationalOnly(field)\n}\n\nexport function tabHasName(tab: Tab): tab is NamedTab {\n return 'name' in tab\n}\n\nexport function fieldIsLocalized(field: Field | Tab): boolean {\n return 'localized' in field && field.localized\n}\n\nexport type HookName =\n | 'afterChange'\n | 'afterRead'\n | 'beforeChange'\n | 'beforeRead'\n | 'beforeValidate'\n"],"names":["valueIsValueWithRelation","value","fieldHasSubFields","field","type","fieldIsArrayType","fieldIsBlockType","fieldIsGroupType","optionIsObject","option","optionsAreObjects","options","Array","isArray","optionIsValue","fieldSupportsMany","fieldHasMaxDepth","maxDepth","fieldIsPresentationalOnly","fieldAffectsData","tabHasName","tab","fieldIsLocalized","localized"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,qDAAqD,GACrD,uCAAuC,GA8iBvC,OAAO,SAASA,yBAAyBC,KAAc;IACrD,OAAOA,UAAU,QAAQ,OAAOA,UAAU,YAAY,gBAAgBA,SAAS,WAAWA;AAC5F;AAsMA,OAAO,SAASC,kBAAkBC,KAAgC;IAChE,OACEA,MAAMC,IAAI,KAAK,WACfD,MAAMC,IAAI,KAAK,WACfD,MAAMC,IAAI,KAAK,SACfD,MAAMC,IAAI,KAAK;AAEnB;AAEA,OAAO,SAASC,iBAAiBF,KAAY;IAC3C,OAAOA,MAAMC,IAAI,KAAK;AACxB;AAEA,OAAO,SAASE,iBAAiBH,KAAY;IAC3C,OAAOA,MAAMC,IAAI,KAAK;AACxB;AAEA,OAAO,SAASG,iBAAiBJ,KAAY;IAC3C,OAAOA,MAAMC,IAAI,KAAK;AACxB;AAEA,OAAO,SAASI,eAAeC,MAAc;IAC3C,OAAO,OAAOA,WAAW;AAC3B;AAEA,OAAO,SAASC,kBAAkBC,OAAiB;IACjD,OAAOC,MAAMC,OAAO,CAACF,YAAY,OAAOA,SAAS,CAAC,EAAE,KAAK;AAC3D;AAEA,OAAO,SAASG,cAAcL,MAAc;IAC1C,OAAO,OAAOA,WAAW;AAC3B;AAEA,OAAO,SAASM,kBAAkBZ,KAAY;IAC5C,OAAOA,MAAMC,IAAI,KAAK,YAAYD,MAAMC,IAAI,KAAK;AACnD;AAEA,OAAO,SAASY,iBAAiBb,KAAY;IAC3C,OACE,AAACA,CAAAA,MAAMC,IAAI,KAAK,YAAYD,MAAMC,IAAI,KAAK,cAAa,KAAM,OAAOD,MAAMc,QAAQ,KAAK;AAE5F;AAEA,OAAO,SAASC,0BACdf,KAA6C;IAE7C,OAAOA,MAAMC,IAAI,KAAK;AACxB;AAEA,OAAO,SAASe,iBACdhB,KAA6C;IAE7C,OAAO,UAAUA,SAAS,CAACe,0BAA0Bf;AACvD;AAEA,OAAO,SAASiB,WAAWC,GAAQ;IACjC,OAAO,UAAUA;AACnB;AAEA,OAAO,SAASC,iBAAiBnB,KAAkB;IACjD,OAAO,eAAeA,SAASA,MAAMoB,SAAS;AAChD"}
|
|
1
|
+
{"version":3,"sources":["../../../src/fields/config/types.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable no-use-before-define */\nimport type { EditorProps } from '@monaco-editor/react'\nimport type { CSSProperties } from 'react'\n\n//eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport monacoeditor from 'monaco-editor' // IMPORTANT - DO NOT REMOVE: This is required for pnpm's default isolated mode to work - even though the import is not used. This is due to a typescript bug: https://github.com/microsoft/TypeScript/issues/47663#issuecomment-1519138189. (tsbugisolatedmode)\nimport type React from 'react'\n\nimport type {\n ConditionalDateProps,\n Description,\n ErrorProps,\n LabelProps,\n RichTextAdapter,\n RowLabel,\n} from '../../admin/types.js'\nimport type { User } from '../../auth/index.js'\nimport type { SanitizedCollectionConfig, TypeWithID } from '../../collections/config/types.js'\nimport type { CustomComponent, LabelFunction } from '../../config/types.js'\nimport type { DBIdentifierName } from '../../database/types.js'\nimport type { SanitizedGlobalConfig } from '../../globals/config/types.js'\nimport type { Operation, PayloadRequest, RequestContext, Where } from '../../types/index.js'\nimport type { ClientFieldConfig } from './client.js'\n\nexport type FieldHookArgs<T extends TypeWithID = any, P = any, S = any> = {\n /** The collection which the field belongs to. If the field belongs to a global, this will be null. */\n collection: SanitizedCollectionConfig | null\n context: RequestContext\n /** The data passed to update the document within create and update operations, and the full document itself in the afterRead hook. */\n data?: Partial<T>\n /** The field which the hook is running against. */\n field: FieldAffectingData\n /** Boolean to denote if this hook is running against finding one, or finding many within the afterRead hook. */\n findMany?: boolean\n /** The global which the field belongs to. If the field belongs to a collection, this will be null. */\n global: SanitizedGlobalConfig | null\n /** A string relating to which operation the field type is currently executing within. Useful within beforeValidate, beforeChange, and afterChange hooks to differentiate between create and update operations. */\n operation?: 'create' | 'delete' | 'read' | 'update'\n /** The full original document in `update` operations. In the `afterChange` hook, this is the resulting document of the operation. */\n originalDoc?: T\n /** The document before changes were applied, only in `afterChange` hooks. */\n previousDoc?: T\n /** The sibling data of the document before changes being applied, only in `beforeChange` and `afterChange` hook. */\n previousSiblingDoc?: T\n /** The previous value of the field, before changes, only in `beforeChange` and `afterChange` hooks. */\n previousValue?: P\n /** The Express request object. It is mocked for Local API operations. */\n req: PayloadRequest\n /** The sibling data passed to a field that the hook is running against. */\n siblingData: Partial<S>\n /** The value of the field. */\n value?: P\n}\n\nexport type FieldHook<T extends TypeWithID = any, P = any, S = any> = (\n args: FieldHookArgs<T, P, S>,\n) => P | Promise<P>\n\nexport type FieldAccess<T extends TypeWithID = any, P = any, U = any> = (args: {\n /**\n * The incoming data used to `create` or `update` the document with. `data` is undefined during the `read` operation.\n */\n data?: Partial<T>\n /**\n * The original data of the document before the `update` is applied. `doc` is undefined during the `create` operation.\n */\n doc?: T\n /**\n * The `id` of the current document being read or updated. `id` is undefined during the `create` operation.\n */\n id?: number | string\n /** The `payload` object to interface with the payload API */\n req: PayloadRequest<U>\n /**\n * Immediately adjacent data to this field. For example, if this is a `group` field, then `siblingData` will be the other fields within the group.\n */\n siblingData?: Partial<P>\n}) => Promise<boolean> | boolean\n\nexport type Condition<T extends TypeWithID = any, P = any> = (\n data: Partial<T>,\n siblingData: Partial<P>,\n { user }: { user: PayloadRequest['user'] },\n) => boolean\n\nexport type FilterOptionsProps<T = any> = {\n /**\n * An object containing the full collection or global document currently being edited.\n */\n data: T\n /**\n * The `id` of the current document being edited. `id` is undefined during the `create` operation.\n */\n id: number | string\n /**\n * The collection `slug` to filter against, limited to this field's `relationTo` property.\n */\n relationTo: string\n /**\n * An object containing document data that is scoped to only fields within the same parent of this field.\n */\n siblingData: unknown\n /**\n * An object containing the currently authenticated user.\n */\n user: Partial<PayloadRequest['user']>\n}\n\nexport type FilterOptions<T = any> =\n | ((options: FilterOptionsProps<T>) => Promise<Where | boolean> | Where | boolean)\n | Where\n | null\n\ntype Admin = {\n className?: string\n components?: {\n Cell?: CustomComponent\n Field?: CustomComponent\n Filter?: React.ComponentType<any>\n }\n /**\n * You can programmatically show / hide fields based on what other fields are doing.\n * This is also run on the server, to determine if the field should be validated.\n */\n condition?: Condition\n description?: Description\n disableBulkEdit?: boolean\n disabled?: boolean\n hidden?: boolean\n position?: 'sidebar'\n readOnly?: boolean\n style?: CSSProperties\n width?: string\n}\n\nexport type Labels = {\n plural: LabelFunction | Record<string, string> | string\n singular: LabelFunction | Record<string, string> | string\n}\n\nexport type BaseValidateOptions<TData, TSiblingData> = {\n data: Partial<TData>\n id?: number | string\n operation?: Operation\n req: PayloadRequest\n siblingData: Partial<TSiblingData>\n}\n\nexport type ValidateOptions<TData, TSiblingData, TFieldConfig extends object> = BaseValidateOptions<\n TData,\n TSiblingData\n> &\n TFieldConfig\n\nexport type Validate<\n TValue = any,\n TData = any,\n TSiblingData = any,\n TFieldConfig extends object = object,\n> = (\n value: TValue,\n options: ValidateOptions<TData, TSiblingData, TFieldConfig>,\n) => Promise<string | true> | string | true\n\nexport type ClientValidate = Omit<Validate, 'req'>\n\nexport type OptionObject = {\n label: LabelFunction | Record<string, string> | string\n value: string\n}\n\nexport type Option = OptionObject | string\n\nexport interface FieldBase {\n access?: {\n create?: FieldAccess\n read?: FieldAccess\n update?: FieldAccess\n }\n admin?: Admin\n /** Extension point to add your custom data. */\n custom?: Record<string, any>\n defaultValue?: any\n hidden?: boolean\n hooks?: {\n afterChange?: FieldHook[]\n afterRead?: FieldHook[]\n beforeChange?: FieldHook[]\n /**\n * Runs before a document is duplicated to prevent errors in unique fields or return null to use defaultValue.\n */\n beforeDuplicate?: FieldHook[]\n beforeValidate?: FieldHook[]\n }\n index?: boolean\n label?: LabelFunction | Record<string, string> | false | string\n localized?: boolean\n name: string\n required?: boolean\n saveToJWT?: boolean | string\n unique?: boolean\n validate?: Validate\n}\n\nexport type NumberField = FieldBase & {\n admin?: Admin & {\n /** Set this property to a string that will be used for browser autocomplete. */\n autoComplete?: string\n components?: {\n Error?: CustomComponent<ErrorProps>\n Label?: CustomComponent<LabelProps>\n afterInput?: CustomComponent[]\n beforeInput?: CustomComponent[]\n }\n /** Set this property to define a placeholder string for the field. */\n placeholder?: Record<string, string> | string\n /** Set a value for the number field to increment / decrement using browser controls. */\n step?: number\n }\n /** Maximum value accepted. Used in the default `validation` function. */\n max?: number\n /** Minimum value accepted. Used in the default `validation` function. */\n min?: number\n type: 'number'\n} & (\n | {\n /** Makes this field an ordered array of numbers instead of just a single number. */\n hasMany: true\n /** Maximum number of numbers in the numbers array, if `hasMany` is set to true. */\n maxRows?: number\n /** Minimum number of numbers in the numbers array, if `hasMany` is set to true. */\n minRows?: number\n }\n | {\n /** Makes this field an ordered array of numbers instead of just a single number. */\n hasMany?: false | undefined\n /** Maximum number of numbers in the numbers array, if `hasMany` is set to true. */\n maxRows?: undefined\n /** Minimum number of numbers in the numbers array, if `hasMany` is set to true. */\n minRows?: undefined\n }\n )\n\nexport type TextField = FieldBase & {\n admin?: Admin & {\n autoComplete?: string\n components?: {\n Error?: CustomComponent<ErrorProps>\n Label?: CustomComponent<LabelProps>\n afterInput?: CustomComponent[]\n beforeInput?: CustomComponent[]\n }\n placeholder?: Record<string, string> | string\n rtl?: boolean\n }\n maxLength?: number\n minLength?: number\n type: 'text'\n} & (\n | {\n /** Makes this field an ordered array of strings instead of just a single string. */\n hasMany: true\n /** Maximum number of strings in the strings array, if `hasMany` is set to true. */\n maxRows?: number\n /** Minimum number of strings in the strings array, if `hasMany` is set to true. */\n minRows?: number\n }\n | {\n /** Makes this field an ordered array of strings instead of just a single string. */\n hasMany?: false | undefined\n /** Maximum number of strings in the strings array, if `hasMany` is set to true. */\n maxRows?: undefined\n /** Minimum number of strings in the strings array, if `hasMany` is set to true. */\n minRows?: undefined\n }\n )\n\nexport type EmailField = FieldBase & {\n admin?: Admin & {\n autoComplete?: string\n components?: {\n Error?: CustomComponent<ErrorProps>\n Label?: CustomComponent<LabelProps>\n afterInput?: CustomComponent[]\n beforeInput?: CustomComponent[]\n }\n placeholder?: Record<string, string> | string\n }\n type: 'email'\n}\n\nexport type TextareaField = FieldBase & {\n admin?: Admin & {\n components?: {\n Error?: CustomComponent<ErrorProps>\n Label?: CustomComponent<LabelProps>\n afterInput?: CustomComponent[]\n beforeInput?: CustomComponent[]\n }\n placeholder?: Record<string, string> | string\n rows?: number\n rtl?: boolean\n }\n maxLength?: number\n minLength?: number\n type: 'textarea'\n}\n\nexport type CheckboxField = FieldBase & {\n admin?: Admin & {\n components?: {\n Error?: CustomComponent<ErrorProps>\n Label?: CustomComponent<LabelProps>\n afterInput?: CustomComponent[]\n beforeInput?: CustomComponent[]\n }\n }\n type: 'checkbox'\n}\n\nexport type DateField = FieldBase & {\n admin?: Admin & {\n components?: {\n Error?: CustomComponent<ErrorProps>\n Label?: CustomComponent<LabelProps>\n afterInput?: CustomComponent[]\n beforeInput?: CustomComponent[]\n }\n date?: ConditionalDateProps\n placeholder?: Record<string, string> | string\n }\n type: 'date'\n}\n\nexport type GroupField = Omit<FieldBase, 'required' | 'validation'> & {\n admin?: Admin & {\n hideGutter?: boolean\n }\n fields: Field[]\n /** Customize generated GraphQL and Typescript schema names.\n * By default it is bound to the collection.\n *\n * This is useful if you would like to generate a top level type to share amongst collections/fields.\n * **Note**: Top level types can collide, ensure they are unique among collections, arrays, groups, blocks, tabs.\n */\n interfaceName?: string\n type: 'group'\n}\n\nexport type RowAdmin = Omit<Admin, 'description'>\n\nexport type RowField = Omit<FieldBase, 'admin' | 'label' | 'name'> & {\n admin?: RowAdmin\n fields: Field[]\n type: 'row'\n}\n\nexport type CollapsibleField = Omit<FieldBase, 'label' | 'name'> & {\n admin?: Admin & {\n initCollapsed?: boolean\n }\n fields: Field[]\n label: RowLabel\n type: 'collapsible'\n}\n\nexport type TabsAdmin = Omit<Admin, 'description'>\n\ntype TabBase = Omit<FieldBase, 'required' | 'validation'> & {\n description?: Description\n fields: Field[]\n interfaceName?: string\n saveToJWT?: boolean | string\n}\n\nexport type NamedTab = TabBase & {\n /** Customize generated GraphQL and Typescript schema names.\n * The slug is used by default.\n *\n * This is useful if you would like to generate a top level type to share amongst collections/fields.\n * **Note**: Top level types can collide, ensure they are unique among collections, arrays, groups, blocks, tabs.\n */\n interfaceName?: string\n}\n\nexport type UnnamedTab = Omit<TabBase, 'name'> & {\n interfaceName?: never\n /**\n * Can be either:\n * - A string, which will be used as the tab's label.\n * - An object, where the key is the language code and the value is the label.\n */\n label:\n | {\n [selectedLanguage: string]: string\n }\n | LabelFunction\n | string\n localized?: never\n}\n\nexport type Tab = NamedTab | UnnamedTab\n\nexport type TabsField = Omit<FieldBase, 'admin' | 'localized' | 'name' | 'saveToJWT'> & {\n admin?: TabsAdmin\n tabs: Tab[]\n type: 'tabs'\n}\n\nexport type TabAsField = Tab & {\n name?: string\n type: 'tab'\n}\n\nexport type UIField = {\n admin: {\n components?: {\n Cell?: CustomComponent\n Field: CustomComponent\n Filter?: React.ComponentType<any>\n }\n condition?: Condition\n disableBulkEdit?: boolean\n position?: string\n width?: string\n }\n /** Extension point to add your custom data. */\n custom?: Record<string, any>\n label?: Record<string, string> | string\n name: string\n type: 'ui'\n}\n\nexport type UploadField = FieldBase & {\n admin?: {\n components?: {\n Error?: CustomComponent<ErrorProps>\n Label?: CustomComponent<LabelProps>\n }\n }\n filterOptions?: FilterOptions\n maxDepth?: number\n relationTo: string\n type: 'upload'\n}\n\ntype CodeAdmin = Admin & {\n components?: {\n Error?: CustomComponent<ErrorProps>\n Label?: CustomComponent<LabelProps>\n }\n editorOptions?: EditorProps['options']\n language?: string\n}\n\nexport type CodeField = Omit<FieldBase, 'admin'> & {\n admin?: CodeAdmin\n maxLength?: number\n minLength?: number\n type: 'code'\n}\n\ntype JSONAdmin = Admin & {\n components?: {\n Error?: CustomComponent<ErrorProps>\n Label?: CustomComponent<LabelProps>\n }\n editorOptions?: EditorProps['options']\n}\n\nexport type JSONField = Omit<FieldBase, 'admin'> & {\n admin?: JSONAdmin\n type: 'json'\n}\n\nexport type SelectField = FieldBase & {\n admin?: Admin & {\n components?: {\n Error?: CustomComponent<ErrorProps>\n Label?: CustomComponent<LabelProps>\n }\n isClearable?: boolean\n isSortable?: boolean\n }\n /**\n * Customize the SQL table name\n */\n dbName?: DBIdentifierName\n /**\n * Customize the DB enum name\n */\n enumName?: DBIdentifierName\n hasMany?: boolean\n options: Option[]\n type: 'select'\n}\n\ntype SharedRelationshipProperties = FieldBase & {\n filterOptions?: FilterOptions\n hasMany?: boolean\n maxDepth?: number\n type: 'relationship'\n} & (\n | {\n hasMany: true\n /**\n * @deprecated Use 'maxRows' instead\n */\n max?: number\n maxRows?: number\n /**\n * @deprecated Use 'minRows' instead\n */\n min?: number\n minRows?: number\n }\n | {\n hasMany?: false | undefined\n /**\n * @deprecated Use 'maxRows' instead\n */\n max?: undefined\n maxRows?: undefined\n /**\n * @deprecated Use 'minRows' instead\n */\n min?: undefined\n minRows?: undefined\n }\n )\n\ntype RelationshipAdmin = Admin & {\n allowCreate?: boolean\n components?: {\n Error?: CustomComponent<ErrorProps>\n Label?: CustomComponent<LabelProps>\n }\n isSortable?: boolean\n}\nexport type PolymorphicRelationshipField = SharedRelationshipProperties & {\n admin?: RelationshipAdmin & {\n sortOptions?: { [collectionSlug: string]: string }\n }\n relationTo: string[]\n}\nexport type SingleRelationshipField = SharedRelationshipProperties & {\n admin?: RelationshipAdmin & {\n sortOptions?: string\n }\n relationTo: string\n}\nexport type RelationshipField = PolymorphicRelationshipField | SingleRelationshipField\n\nexport type ValueWithRelation = {\n relationTo: string\n value: number | string\n}\n\nexport function valueIsValueWithRelation(value: unknown): value is ValueWithRelation {\n return value !== null && typeof value === 'object' && 'relationTo' in value && 'value' in value\n}\n\nexport type RelationshipValue =\n | (number | string)[]\n | ValueWithRelation\n | ValueWithRelation[]\n | (number | string)\n\nexport type RichTextField<\n Value extends object = any,\n AdapterProps = any,\n ExtraProperties = object,\n> = FieldBase & {\n admin?: Admin & {\n components?: {\n Error?: CustomComponent<ErrorProps>\n Label?: CustomComponent<LabelProps>\n }\n }\n editor?: RichTextAdapter<Value, AdapterProps, AdapterProps>\n type: 'richText'\n} & ExtraProperties\n\nexport type RichTextFieldRequiredEditor<\n Value extends object = any,\n AdapterProps = any,\n ExtraProperties = object,\n> = Omit<RichTextField<Value, AdapterProps, ExtraProperties>, 'editor'> & {\n editor: RichTextAdapter<Value, AdapterProps, ExtraProperties>\n}\n\nexport type ArrayField = FieldBase & {\n admin?: Admin & {\n components?: {\n RowLabel?: RowLabel\n } & Admin['components']\n initCollapsed?: boolean\n }\n /**\n * Customize the SQL table name\n */\n dbName?: DBIdentifierName\n fields: Field[]\n /** Customize generated GraphQL and Typescript schema names.\n * By default it is bound to the collection.\n *\n * This is useful if you would like to generate a top level type to share amongst collections/fields.\n * **Note**: Top level types can collide, ensure they are unique among collections, arrays, groups, blocks, tabs.\n */\n interfaceName?: string\n labels?: Labels\n maxRows?: number\n minRows?: number\n type: 'array'\n}\n\nexport type RadioField = FieldBase & {\n admin?: Admin & {\n components?: {\n Error?: CustomComponent<ErrorProps>\n Label?: CustomComponent<LabelProps>\n }\n layout?: 'horizontal' | 'vertical'\n }\n /**\n * Customize the SQL table name\n */\n dbName?: DBIdentifierName\n /**\n * Customize the DB enum name\n */\n enumName?: DBIdentifierName\n options: Option[]\n type: 'radio'\n}\n\nexport type Block = {\n /** Extension point to add your custom data. */\n custom?: Record<string, any>\n /**\n * Customize the SQL table name\n */\n dbName?: DBIdentifierName\n fields: Field[]\n /** @deprecated - please migrate to the interfaceName property instead. */\n graphQL?: {\n singularName?: string\n }\n imageAltText?: string\n imageURL?: string\n /** Customize generated GraphQL and Typescript schema names.\n * The slug is used by default.\n *\n * This is useful if you would like to generate a top level type to share amongst collections/fields.\n * **Note**: Top level types can collide, ensure they are unique among collections, arrays, groups, blocks, tabs.\n */\n interfaceName?: string\n labels?: Labels\n slug: string\n}\n\nexport type BlockField = FieldBase & {\n admin?: Admin & {\n initCollapsed?: boolean\n }\n blocks: Block[]\n defaultValue?: unknown\n labels?: Labels\n maxRows?: number\n minRows?: number\n type: 'blocks'\n}\n\nexport type PointField = FieldBase & {\n type: 'point'\n}\n\nexport type Field =\n | ArrayField\n | BlockField\n | CheckboxField\n | CodeField\n | CollapsibleField\n | DateField\n | EmailField\n | GroupField\n | JSONField\n | NumberField\n | PointField\n | RadioField\n | RelationshipField\n | RichTextField\n | RowField\n | SelectField\n | TabsField\n | TextField\n | TextareaField\n | UIField\n | UploadField\n\nexport type FieldWithRichTextRequiredEditor =\n | Exclude<Field, RichTextField>\n | RichTextFieldRequiredEditor\n\nexport type FieldAffectingData =\n | ArrayField\n | BlockField\n | CheckboxField\n | CodeField\n | DateField\n | EmailField\n | GroupField\n | JSONField\n | NumberField\n | PointField\n | RadioField\n | RelationshipField\n | RichTextField\n | SelectField\n | TabAsField\n | TextField\n | TextareaField\n | UploadField\n\nexport type NonPresentationalField =\n | ArrayField\n | BlockField\n | CheckboxField\n | CodeField\n | CollapsibleField\n | DateField\n | EmailField\n | GroupField\n | JSONField\n | NumberField\n | PointField\n | RadioField\n | RelationshipField\n | RichTextField\n | RowField\n | SelectField\n | TabsField\n | TextField\n | TextareaField\n | UploadField\n\nexport type FieldWithPath = Field & {\n path?: string\n}\n\nexport type FieldWithSubFields = ArrayField | CollapsibleField | GroupField | RowField\n\nexport type FieldPresentationalOnly = UIField\n\nexport type FieldWithMany = RelationshipField | SelectField\n\nexport type FieldWithMaxDepth = RelationshipField | UploadField\n\nexport function fieldHasSubFields(field: ClientFieldConfig | Field): field is FieldWithSubFields {\n return (\n field.type === 'group' ||\n field.type === 'array' ||\n field.type === 'row' ||\n field.type === 'collapsible'\n )\n}\n\nexport function fieldIsArrayType(field: Field): field is ArrayField {\n return field.type === 'array'\n}\n\nexport function fieldIsBlockType(field: Field): field is BlockField {\n return field.type === 'blocks'\n}\n\nexport function fieldIsGroupType(field: Field): field is GroupField {\n return field.type === 'group'\n}\n\nexport function optionIsObject(option: Option): option is OptionObject {\n return typeof option === 'object'\n}\n\nexport function optionsAreObjects(options: Option[]): options is OptionObject[] {\n return Array.isArray(options) && typeof options?.[0] === 'object'\n}\n\nexport function optionIsValue(option: Option): option is string {\n return typeof option === 'string'\n}\n\nexport function fieldSupportsMany(field: Field): field is FieldWithMany {\n return field.type === 'select' || field.type === 'relationship'\n}\n\nexport function fieldHasMaxDepth(field: Field): field is FieldWithMaxDepth {\n return (\n (field.type === 'upload' || field.type === 'relationship') && typeof field.maxDepth === 'number'\n )\n}\n\nexport function fieldIsPresentationalOnly(\n field: ClientFieldConfig | Field | TabAsField,\n): field is UIField {\n return field.type === 'ui'\n}\n\nexport function fieldAffectsData(\n field: ClientFieldConfig | Field | TabAsField,\n): field is FieldAffectingData {\n return 'name' in field && !fieldIsPresentationalOnly(field)\n}\n\nexport function tabHasName(tab: Tab): tab is NamedTab {\n return 'name' in tab\n}\n\nexport function fieldIsLocalized(field: Field | Tab): boolean {\n return 'localized' in field && field.localized\n}\n\nexport type HookName =\n | 'afterChange'\n | 'afterRead'\n | 'beforeChange'\n | 'beforeRead'\n | 'beforeValidate'\n"],"names":["valueIsValueWithRelation","value","fieldHasSubFields","field","type","fieldIsArrayType","fieldIsBlockType","fieldIsGroupType","optionIsObject","option","optionsAreObjects","options","Array","isArray","optionIsValue","fieldSupportsMany","fieldHasMaxDepth","maxDepth","fieldIsPresentationalOnly","fieldAffectsData","tabHasName","tab","fieldIsLocalized","localized"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,qDAAqD,GACrD,uCAAuC,GA8iBvC,OAAO,SAASA,yBAAyBC,KAAc;IACrD,OAAOA,UAAU,QAAQ,OAAOA,UAAU,YAAY,gBAAgBA,SAAS,WAAWA;AAC5F;AAsMA,OAAO,SAASC,kBAAkBC,KAAgC;IAChE,OACEA,MAAMC,IAAI,KAAK,WACfD,MAAMC,IAAI,KAAK,WACfD,MAAMC,IAAI,KAAK,SACfD,MAAMC,IAAI,KAAK;AAEnB;AAEA,OAAO,SAASC,iBAAiBF,KAAY;IAC3C,OAAOA,MAAMC,IAAI,KAAK;AACxB;AAEA,OAAO,SAASE,iBAAiBH,KAAY;IAC3C,OAAOA,MAAMC,IAAI,KAAK;AACxB;AAEA,OAAO,SAASG,iBAAiBJ,KAAY;IAC3C,OAAOA,MAAMC,IAAI,KAAK;AACxB;AAEA,OAAO,SAASI,eAAeC,MAAc;IAC3C,OAAO,OAAOA,WAAW;AAC3B;AAEA,OAAO,SAASC,kBAAkBC,OAAiB;IACjD,OAAOC,MAAMC,OAAO,CAACF,YAAY,OAAOA,SAAS,CAAC,EAAE,KAAK;AAC3D;AAEA,OAAO,SAASG,cAAcL,MAAc;IAC1C,OAAO,OAAOA,WAAW;AAC3B;AAEA,OAAO,SAASM,kBAAkBZ,KAAY;IAC5C,OAAOA,MAAMC,IAAI,KAAK,YAAYD,MAAMC,IAAI,KAAK;AACnD;AAEA,OAAO,SAASY,iBAAiBb,KAAY;IAC3C,OACE,AAACA,CAAAA,MAAMC,IAAI,KAAK,YAAYD,MAAMC,IAAI,KAAK,cAAa,KAAM,OAAOD,MAAMc,QAAQ,KAAK;AAE5F;AAEA,OAAO,SAASC,0BACdf,KAA6C;IAE7C,OAAOA,MAAMC,IAAI,KAAK;AACxB;AAEA,OAAO,SAASe,iBACdhB,KAA6C;IAE7C,OAAO,UAAUA,SAAS,CAACe,0BAA0Bf;AACvD;AAEA,OAAO,SAASiB,WAAWC,GAAQ;IACjC,OAAO,UAAUA;AACnB;AAEA,OAAO,SAASC,iBAAiBnB,KAAkB;IACjD,OAAO,eAAeA,SAASA,MAAMoB,SAAS;AAChD"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PayloadRequest } from '../types/index.js';
|
|
2
2
|
type Args = {
|
|
3
3
|
defaultValue: unknown;
|
|
4
4
|
locale: string | undefined;
|
|
5
|
-
user:
|
|
5
|
+
user: PayloadRequest['user'];
|
|
6
6
|
value?: unknown;
|
|
7
7
|
};
|
|
8
8
|
declare const getValueWithDefault: ({ defaultValue, locale, user, value }: Args) => unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDefaultValue.d.ts","sourceRoot":"","sources":["../../src/fields/getDefaultValue.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getDefaultValue.d.ts","sourceRoot":"","sources":["../../src/fields/getDefaultValue.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAIvD,KAAK,IAAI,GAAG;IACV,YAAY,EAAE,OAAO,CAAA;IACrB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,CAAA;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,QAAA,MAAM,mBAAmB,0CAA2C,IAAI,KAAG,OAc1E,CAAA;AAGD,eAAe,mBAAmB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/fields/getDefaultValue.ts"],"sourcesContent":["import type { User } from '../auth/index.js'\n\nimport { deepCopyObject } from '../utilities/deepCopyObject.js'\n\ntype Args = {\n defaultValue: unknown\n locale: string | undefined\n user:
|
|
1
|
+
{"version":3,"sources":["../../src/fields/getDefaultValue.ts"],"sourcesContent":["import type { User } from '../auth/index.js'\nimport type { PayloadRequest } from '../types/index.js'\n\nimport { deepCopyObject } from '../utilities/deepCopyObject.js'\n\ntype Args = {\n defaultValue: unknown\n locale: string | undefined\n user: PayloadRequest['user']\n value?: unknown\n}\n\nconst getValueWithDefault = ({ defaultValue, locale, user, value }: Args): unknown => {\n if (typeof value !== 'undefined') {\n return value\n }\n\n if (defaultValue && typeof defaultValue === 'function') {\n return defaultValue({ locale, user })\n }\n\n if (typeof defaultValue === 'object') {\n return deepCopyObject(defaultValue)\n }\n\n return defaultValue\n}\n\n// eslint-disable-next-line no-restricted-exports\nexport default getValueWithDefault\n"],"names":["deepCopyObject","getValueWithDefault","defaultValue","locale","user","value"],"rangeMappings":";;;;;;;;;;;;;;;;;","mappings":"AAGA,SAASA,cAAc,QAAQ,iCAAgC;AAS/D,MAAMC,sBAAsB,CAAC,EAAEC,YAAY,EAAEC,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAQ;IACtE,IAAI,OAAOA,UAAU,aAAa;QAChC,OAAOA;IACT;IAEA,IAAIH,gBAAgB,OAAOA,iBAAiB,YAAY;QACtD,OAAOA,aAAa;YAAEC;YAAQC;QAAK;IACrC;IAEA,IAAI,OAAOF,iBAAiB,UAAU;QACpC,OAAOF,eAAeE;IACxB;IAEA,OAAOA;AACT;AAEA,iDAAiD;AACjD,eAAeD,oBAAmB"}
|
|
@@ -29,8 +29,8 @@ declare const _default: {
|
|
|
29
29
|
admin?: {
|
|
30
30
|
className?: string;
|
|
31
31
|
components?: {
|
|
32
|
-
Cell?: import("
|
|
33
|
-
Field?: import("
|
|
32
|
+
Cell?: import("../config/types.js").CustomComponent;
|
|
33
|
+
Field?: import("../config/types.js").CustomComponent;
|
|
34
34
|
Filter?: import("react").ComponentType<any>;
|
|
35
35
|
};
|
|
36
36
|
condition?: import("./config/types.js").Condition<any, any>;
|
|
@@ -44,8 +44,8 @@ declare const _default: {
|
|
|
44
44
|
width?: string;
|
|
45
45
|
} & {
|
|
46
46
|
components?: {
|
|
47
|
-
Error?: import("
|
|
48
|
-
Label?: import("
|
|
47
|
+
Error?: import("../config/types.js").CustomComponent<import("../admin/types.js").ErrorProps>;
|
|
48
|
+
Label?: import("../config/types.js").CustomComponent<import("../admin/types.js").LabelProps>;
|
|
49
49
|
};
|
|
50
50
|
editorOptions?: import("monaco-editor").editor.IStandaloneEditorConstructionOptions;
|
|
51
51
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validations.d.ts","sourceRoot":"","sources":["../../src/fields/validations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,UAAU,EACV,UAAU,EACV,aAAa,EACb,SAAS,EACT,SAAS,EACT,UAAU,EACV,SAAS,EACT,WAAW,EACX,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,SAAS,EACT,aAAa,EACb,WAAW,EACX,QAAQ,EACT,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"validations.d.ts","sourceRoot":"","sources":["../../src/fields/validations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,UAAU,EACV,UAAU,EACV,aAAa,EACb,SAAS,EACT,SAAS,EACT,UAAU,EACV,SAAS,EACT,WAAW,EACX,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,SAAS,EACT,aAAa,EACb,WAAW,EACX,QAAQ,EACT,MAAM,mBAAmB,CAAA;AAK1B,eAAO,MAAM,IAAI,EAAE,QAAQ,CAAC,MAAM,GAAG,MAAM,EAAE,EAAE,O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