payload 3.0.0-canary.95fcd13 → 3.0.0-canary.9beaa28
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/bin.js +43 -10
- package/dist/admin/RichText.d.ts +21 -17
- package/dist/admin/RichText.d.ts.map +1 -1
- package/dist/admin/RichText.js.map +1 -1
- package/dist/admin/elements/Cell.d.ts +11 -26
- package/dist/admin/elements/Cell.d.ts.map +1 -1
- package/dist/admin/elements/Cell.js.map +1 -1
- package/dist/admin/elements/Tab.d.ts +16 -15
- package/dist/admin/elements/Tab.d.ts.map +1 -1
- package/dist/admin/elements/Tab.js.map +1 -1
- package/dist/admin/fields/Array.d.ts +15 -18
- package/dist/admin/fields/Array.d.ts.map +1 -1
- package/dist/admin/fields/Array.js.map +1 -1
- package/dist/admin/fields/Blocks.d.ts +15 -28
- package/dist/admin/fields/Blocks.d.ts.map +1 -1
- package/dist/admin/fields/Blocks.js.map +1 -1
- package/dist/admin/fields/Checkbox.d.ts +19 -15
- package/dist/admin/fields/Checkbox.d.ts.map +1 -1
- package/dist/admin/fields/Checkbox.js.map +1 -1
- package/dist/admin/fields/Code.d.ts +15 -13
- package/dist/admin/fields/Code.d.ts.map +1 -1
- package/dist/admin/fields/Code.js.map +1 -1
- package/dist/admin/fields/Collapsible.d.ts +13 -11
- package/dist/admin/fields/Collapsible.d.ts.map +1 -1
- package/dist/admin/fields/Collapsible.js.map +1 -1
- package/dist/admin/fields/Date.d.ts +14 -13
- package/dist/admin/fields/Date.d.ts.map +1 -1
- package/dist/admin/fields/Date.js.map +1 -1
- package/dist/admin/fields/Email.d.ts +15 -13
- package/dist/admin/fields/Email.d.ts.map +1 -1
- package/dist/admin/fields/Email.js.map +1 -1
- package/dist/admin/fields/Group.d.ts +13 -13
- package/dist/admin/fields/Group.d.ts.map +1 -1
- package/dist/admin/fields/Group.js.map +1 -1
- package/dist/admin/fields/Hidden.d.ts +8 -10
- package/dist/admin/fields/Hidden.d.ts.map +1 -1
- package/dist/admin/fields/Hidden.js.map +1 -1
- package/dist/admin/fields/JSON.d.ts +14 -13
- package/dist/admin/fields/JSON.d.ts.map +1 -1
- package/dist/admin/fields/JSON.js.map +1 -1
- package/dist/admin/fields/Number.d.ts +15 -18
- package/dist/admin/fields/Number.d.ts.map +1 -1
- package/dist/admin/fields/Number.js.map +1 -1
- package/dist/admin/fields/Point.d.ts +14 -12
- package/dist/admin/fields/Point.d.ts.map +1 -1
- package/dist/admin/fields/Point.js.map +1 -1
- package/dist/admin/fields/Radio.d.ts +16 -15
- package/dist/admin/fields/Radio.d.ts.map +1 -1
- package/dist/admin/fields/Radio.js.map +1 -1
- package/dist/admin/fields/Relationship.d.ts +14 -15
- package/dist/admin/fields/Relationship.d.ts.map +1 -1
- package/dist/admin/fields/Relationship.js.map +1 -1
- package/dist/admin/fields/RichText.d.ts +15 -12
- package/dist/admin/fields/RichText.d.ts.map +1 -1
- package/dist/admin/fields/RichText.js.map +1 -1
- package/dist/admin/fields/Row.d.ts +14 -12
- package/dist/admin/fields/Row.d.ts.map +1 -1
- package/dist/admin/fields/Row.js.map +1 -1
- package/dist/admin/fields/Select.d.ts +16 -17
- package/dist/admin/fields/Select.d.ts.map +1 -1
- package/dist/admin/fields/Select.js.map +1 -1
- package/dist/admin/fields/Tabs.d.ts +17 -19
- package/dist/admin/fields/Tabs.d.ts.map +1 -1
- package/dist/admin/fields/Tabs.js.map +1 -1
- package/dist/admin/fields/Text.d.ts +17 -19
- package/dist/admin/fields/Text.d.ts.map +1 -1
- package/dist/admin/fields/Text.js.map +1 -1
- package/dist/admin/fields/Textarea.d.ts +17 -15
- package/dist/admin/fields/Textarea.d.ts.map +1 -1
- package/dist/admin/fields/Textarea.js.map +1 -1
- package/dist/admin/fields/Upload.d.ts +15 -12
- package/dist/admin/fields/Upload.d.ts.map +1 -1
- package/dist/admin/fields/Upload.js.map +1 -1
- package/dist/admin/forms/Description.d.ts +24 -0
- package/dist/admin/forms/Description.d.ts.map +1 -0
- package/dist/admin/forms/Description.js +3 -0
- package/dist/admin/forms/Description.js.map +1 -0
- package/dist/admin/forms/Error.d.ts +19 -12
- package/dist/admin/forms/Error.d.ts.map +1 -1
- package/dist/admin/forms/Error.js.map +1 -1
- package/dist/admin/forms/Field.d.ts +23 -28
- package/dist/admin/forms/Field.d.ts.map +1 -1
- package/dist/admin/forms/Field.js.map +1 -1
- package/dist/admin/forms/Label.d.ts +21 -15
- package/dist/admin/forms/Label.d.ts.map +1 -1
- package/dist/admin/forms/Label.js.map +1 -1
- package/dist/admin/types.d.ts +60 -32
- package/dist/admin/types.d.ts.map +1 -1
- package/dist/admin/types.js.map +1 -1
- package/dist/admin/views/types.d.ts +22 -13
- package/dist/admin/views/types.d.ts.map +1 -1
- package/dist/admin/views/types.js.map +1 -1
- package/dist/auth/baseFields/apiKey.js +2 -2
- package/dist/auth/baseFields/apiKey.js.map +1 -1
- package/dist/auth/baseFields/email.js +1 -1
- package/dist/auth/baseFields/email.js.map +1 -1
- package/dist/auth/baseFields/username.js +1 -1
- package/dist/auth/baseFields/username.js.map +1 -1
- package/dist/auth/baseFields/verification.js +1 -1
- package/dist/auth/baseFields/verification.js.map +1 -1
- package/dist/auth/ensureUsernameOrEmail.js +2 -2
- package/dist/auth/ensureUsernameOrEmail.js.map +1 -1
- package/dist/auth/strategies/jwt.d.ts.map +1 -1
- package/dist/auth/strategies/jwt.js +57 -24
- package/dist/auth/strategies/jwt.js.map +1 -1
- package/dist/auth/strategies/local/register.d.ts.map +1 -1
- package/dist/auth/strategies/local/register.js +27 -9
- package/dist/auth/strategies/local/register.js.map +1 -1
- package/dist/bin/generateImportMap/index.d.ts +47 -0
- package/dist/bin/generateImportMap/index.d.ts.map +1 -0
- package/dist/bin/generateImportMap/index.js +129 -0
- package/dist/bin/generateImportMap/index.js.map +1 -0
- package/dist/bin/generateImportMap/iterateCollections.d.ts +12 -0
- package/dist/bin/generateImportMap/iterateCollections.d.ts.map +1 -0
- package/dist/bin/generateImportMap/iterateCollections.js +41 -0
- package/dist/bin/generateImportMap/iterateCollections.js.map +1 -0
- package/dist/bin/generateImportMap/iterateConfig.d.ts +10 -0
- package/dist/bin/generateImportMap/iterateConfig.d.ts.map +1 -0
- package/dist/bin/generateImportMap/iterateConfig.js +75 -0
- package/dist/bin/generateImportMap/iterateConfig.js.map +1 -0
- package/dist/bin/generateImportMap/iterateFields.d.ts +12 -0
- package/dist/bin/generateImportMap/iterateFields.d.ts.map +1 -0
- package/dist/bin/generateImportMap/iterateFields.js +56 -0
- package/dist/bin/generateImportMap/iterateFields.js.map +1 -0
- package/dist/bin/generateImportMap/iterateGlobals.d.ts +12 -0
- package/dist/bin/generateImportMap/iterateGlobals.d.ts.map +1 -0
- package/dist/bin/generateImportMap/iterateGlobals.js +34 -0
- package/dist/bin/generateImportMap/iterateGlobals.js.map +1 -0
- package/dist/bin/generateImportMap/parsePayloadComponent.d.ts +6 -0
- package/dist/bin/generateImportMap/parsePayloadComponent.d.ts.map +1 -0
- package/dist/bin/generateImportMap/parsePayloadComponent.js +22 -0
- package/dist/bin/generateImportMap/parsePayloadComponent.js.map +1 -0
- package/dist/bin/index.d.ts.map +1 -1
- package/dist/bin/index.js +38 -6
- package/dist/bin/index.js.map +1 -1
- package/dist/collections/config/client.d.ts +31 -308
- package/dist/collections/config/client.d.ts.map +1 -1
- package/dist/collections/config/client.js +1 -73
- package/dist/collections/config/client.js.map +1 -1
- package/dist/collections/config/types.d.ts +11 -14
- package/dist/collections/config/types.d.ts.map +1 -1
- package/dist/collections/config/types.js.map +1 -1
- package/dist/config/client.d.ts +12 -6
- package/dist/config/client.d.ts.map +1 -1
- package/dist/config/client.js +1 -49
- package/dist/config/client.js.map +1 -1
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +4 -0
- package/dist/config/defaults.js.map +1 -1
- package/dist/config/find.d.ts.map +1 -1
- package/dist/config/find.js +1 -1
- package/dist/config/find.js.map +1 -1
- package/dist/config/sanitize.d.ts.map +1 -1
- package/dist/config/sanitize.js +28 -2
- package/dist/config/sanitize.js.map +1 -1
- package/dist/config/types.d.ts +135 -60
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/types.js.map +1 -1
- package/dist/database/getLocalizedPaths.d.ts.map +1 -1
- package/dist/database/getLocalizedPaths.js +2 -2
- package/dist/database/getLocalizedPaths.js.map +1 -1
- package/dist/database/migrations/createMigration.d.ts.map +1 -1
- package/dist/database/migrations/createMigration.js +5 -1
- package/dist/database/migrations/createMigration.js.map +1 -1
- package/dist/database/migrations/migrate.d.ts +1 -1
- package/dist/database/migrations/migrate.d.ts.map +1 -1
- package/dist/database/migrations/migrate.js +3 -3
- package/dist/database/migrations/migrate.js.map +1 -1
- package/dist/database/migrations/readMigrationFiles.d.ts.map +1 -1
- package/dist/database/migrations/readMigrationFiles.js +3 -2
- package/dist/database/migrations/readMigrationFiles.js.map +1 -1
- package/dist/database/migrations/writeMigrationIndex.d.ts +4 -0
- package/dist/database/migrations/writeMigrationIndex.d.ts.map +1 -0
- package/dist/database/migrations/writeMigrationIndex.js +32 -0
- package/dist/database/migrations/writeMigrationIndex.js.map +1 -0
- package/dist/database/types.d.ts +6 -10
- package/dist/database/types.d.ts.map +1 -1
- package/dist/database/types.js.map +1 -1
- package/dist/errors/ValidationError.d.ts +1 -0
- package/dist/errors/ValidationError.d.ts.map +1 -1
- package/dist/errors/ValidationError.js.map +1 -1
- package/dist/exports/node.d.ts +0 -1
- package/dist/exports/node.d.ts.map +1 -1
- package/dist/exports/node.js +0 -1
- package/dist/exports/node.js.map +1 -1
- package/dist/exports/shared.d.ts +3 -1
- package/dist/exports/shared.d.ts.map +1 -1
- package/dist/exports/shared.js +3 -1
- package/dist/exports/shared.js.map +1 -1
- package/dist/fields/config/client.d.ts +3 -1642
- package/dist/fields/config/client.d.ts.map +1 -1
- package/dist/fields/config/client.js +1 -81
- package/dist/fields/config/client.js.map +1 -1
- package/dist/fields/config/sanitize.d.ts.map +1 -1
- package/dist/fields/config/sanitize.js +23 -22
- package/dist/fields/config/sanitize.js.map +1 -1
- package/dist/fields/config/types.d.ts +418 -80
- package/dist/fields/config/types.d.ts.map +1 -1
- package/dist/fields/config/types.js +3 -0
- package/dist/fields/config/types.js.map +1 -1
- package/dist/fields/hooks/afterRead/promise.d.ts.map +1 -1
- package/dist/fields/hooks/afterRead/promise.js +4 -0
- package/dist/fields/hooks/afterRead/promise.js.map +1 -1
- package/dist/fields/hooks/afterRead/relationshipPopulationPromise.d.ts.map +1 -1
- package/dist/fields/hooks/afterRead/relationshipPopulationPromise.js +10 -10
- package/dist/fields/hooks/afterRead/relationshipPopulationPromise.js.map +1 -1
- package/dist/fields/hooks/beforeChange/index.d.ts.map +1 -1
- package/dist/fields/hooks/beforeChange/index.js +1 -0
- package/dist/fields/hooks/beforeChange/index.js.map +1 -1
- package/dist/globals/config/client.d.ts +26 -14
- package/dist/globals/config/client.d.ts.map +1 -1
- package/dist/globals/config/client.js +1 -47
- package/dist/globals/config/client.js.map +1 -1
- package/dist/globals/config/types.d.ts +5 -8
- package/dist/globals/config/types.d.ts.map +1 -1
- package/dist/globals/config/types.js.map +1 -1
- package/dist/index.d.ts +16 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -8
- package/dist/index.js.map +1 -1
- package/dist/uploads/getBaseFields.d.ts.map +1 -1
- package/dist/uploads/getBaseFields.js +5 -2
- package/dist/uploads/getBaseFields.js.map +1 -1
- package/dist/uploads/imageResizer.d.ts.map +1 -1
- package/dist/uploads/imageResizer.js +10 -1
- package/dist/uploads/imageResizer.js.map +1 -1
- package/dist/uploads/types.d.ts +15 -0
- package/dist/uploads/types.d.ts.map +1 -1
- package/dist/uploads/types.js.map +1 -1
- package/dist/utilities/configToJSONSchema.d.ts.map +1 -1
- package/dist/utilities/configToJSONSchema.js +6 -2
- package/dist/utilities/configToJSONSchema.js.map +1 -1
- package/dist/utilities/configToJSONSchema.spec.js +160 -0
- package/dist/utilities/configToJSONSchema.spec.js.map +1 -1
- package/dist/utilities/fieldSchemaToJSON.d.ts +4 -4
- package/dist/utilities/fieldSchemaToJSON.d.ts.map +1 -1
- package/dist/utilities/fieldSchemaToJSON.js +0 -10
- package/dist/utilities/fieldSchemaToJSON.js.map +1 -1
- package/dist/utilities/flattenTopLevelFields.d.ts +4 -3
- package/dist/utilities/flattenTopLevelFields.d.ts.map +1 -1
- package/dist/utilities/flattenTopLevelFields.js +12 -7
- package/dist/utilities/flattenTopLevelFields.js.map +1 -1
- package/dist/utilities/getEntityPolicies.d.ts.map +1 -1
- package/dist/utilities/getEntityPolicies.js +12 -6
- package/dist/utilities/getEntityPolicies.js.map +1 -1
- package/dist/utilities/telemetry/conf/index.js.map +1 -1
- package/dist/versions/baseFields.js +1 -1
- package/dist/versions/baseFields.js.map +1 -1
- package/package.json +4 -11
- package/dist/admin/fields/index.d.ts +0 -65
- package/dist/admin/fields/index.d.ts.map +0 -1
- package/dist/admin/fields/index.js +0 -3
- package/dist/admin/fields/index.js.map +0 -1
- package/dist/admin/forms/FieldDescription.d.ts +0 -16
- package/dist/admin/forms/FieldDescription.d.ts.map +0 -1
- package/dist/admin/forms/FieldDescription.js +0 -3
- package/dist/admin/forms/FieldDescription.js.map +0 -1
- package/dist/admin/forms/FieldMap.d.ts +0 -23
- package/dist/admin/forms/FieldMap.d.ts.map +0 -1
- package/dist/admin/forms/FieldMap.js +0 -3
- package/dist/admin/forms/FieldMap.js.map +0 -1
- package/dist/admin/forms/FieldTypes.d.ts +0 -27
- package/dist/admin/forms/FieldTypes.d.ts.map +0 -1
- package/dist/admin/forms/FieldTypes.js +0 -3
- package/dist/admin/forms/FieldTypes.js.map +0 -1
- package/dist/bin/loader/clientExtensions.d.ts +0 -2
- package/dist/bin/loader/clientExtensions.d.ts.map +0 -1
- package/dist/bin/loader/clientExtensions.js +0 -13
- package/dist/bin/loader/clientExtensions.js.map +0 -1
- package/dist/bin/loader/compile.d.ts +0 -5
- package/dist/bin/loader/compile.d.ts.map +0 -1
- package/dist/bin/loader/compile.js +0 -27
- package/dist/bin/loader/compile.js.map +0 -1
- package/dist/bin/loader/ignores.d.ts +0 -2
- package/dist/bin/loader/ignores.d.ts.map +0 -1
- package/dist/bin/loader/ignores.js +0 -5
- package/dist/bin/loader/ignores.js.map +0 -1
- package/dist/bin/loader/index.d.ts +0 -34
- package/dist/bin/loader/index.d.ts.map +0 -1
- package/dist/bin/loader/index.js +0 -116
- package/dist/bin/loader/index.js.map +0 -1
- package/dist/bin/loader/read-default-tsconfig.d.ts +0 -29
- package/dist/bin/loader/read-default-tsconfig.d.ts.map +0 -1
- package/dist/bin/loader/read-default-tsconfig.js +0 -116
- package/dist/bin/loader/read-default-tsconfig.js.map +0 -1
- package/dist/bin/loader/resolveOriginalPath.d.ts +0 -10
- package/dist/bin/loader/resolveOriginalPath.d.ts.map +0 -1
- package/dist/bin/loader/resolveOriginalPath.js +0 -36
- package/dist/bin/loader/resolveOriginalPath.js.map +0 -1
- package/dist/utilities/importWithoutClientFiles.d.ts +0 -7
- package/dist/utilities/importWithoutClientFiles.d.ts.map +0 -1
- package/dist/utilities/importWithoutClientFiles.js +0 -47
- package/dist/utilities/importWithoutClientFiles.js.map +0 -1
package/bin.js
CHANGED
|
@@ -1,21 +1,54 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { register } from 'node:module'
|
|
4
3
|
import path from 'node:path'
|
|
5
4
|
import { fileURLToPath, pathToFileURL } from 'node:url'
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
const useSwc = process.argv.includes('--use-swc')
|
|
7
|
+
const disableTranspile = process.argv.includes('--disable-transpile')
|
|
8
|
+
|
|
9
|
+
if (disableTranspile) {
|
|
10
|
+
// Remove --disable-transpile from arguments
|
|
11
|
+
process.argv = process.argv.filter((arg) => arg !== '--disable-transpile')
|
|
12
|
+
|
|
13
|
+
const start = async () => {
|
|
14
|
+
const { bin } = await import('./dist/bin/index.js')
|
|
15
|
+
await bin()
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
void start()
|
|
19
|
+
} else {
|
|
9
20
|
const filename = fileURLToPath(import.meta.url)
|
|
10
21
|
const dirname = path.dirname(filename)
|
|
11
22
|
const url = pathToFileURL(dirname).toString() + '/'
|
|
12
23
|
|
|
13
|
-
|
|
14
|
-
|
|
24
|
+
if (!useSwc) {
|
|
25
|
+
const start = async () => {
|
|
26
|
+
// Use tsx
|
|
27
|
+
let tsImport = (await import('tsx/esm/api')).tsImport
|
|
15
28
|
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
29
|
+
const { bin } = await tsImport('./dist/bin/index.js', url)
|
|
30
|
+
await bin()
|
|
31
|
+
}
|
|
20
32
|
|
|
21
|
-
void start()
|
|
33
|
+
void start()
|
|
34
|
+
} else if (useSwc) {
|
|
35
|
+
const { register } = await import('node:module')
|
|
36
|
+
// Remove --use-swc from arguments
|
|
37
|
+
process.argv = process.argv.filter((arg) => arg !== '--use-swc')
|
|
38
|
+
|
|
39
|
+
try {
|
|
40
|
+
register('@swc-node/register/esm', url)
|
|
41
|
+
} catch (_) {
|
|
42
|
+
console.error(
|
|
43
|
+
'@swc-node/register is not installed. Please install @swc-node/register in your project, if you want to use swc in payload run.',
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const start = async () => {
|
|
48
|
+
const { bin } = await import('./dist/bin/index.js')
|
|
49
|
+
await bin()
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
void start()
|
|
53
|
+
}
|
|
54
|
+
}
|
package/dist/admin/RichText.d.ts
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import type { GenericLanguages, I18n, I18nClient } from '@payloadcms/translations';
|
|
2
2
|
import type { JSONSchema4 } from 'json-schema';
|
|
3
|
-
import type
|
|
3
|
+
import type { ImportMap } from '../bin/generateImportMap/index.js';
|
|
4
4
|
import type { SanitizedCollectionConfig, TypeWithID } from '../collections/config/types.js';
|
|
5
|
-
import type { SanitizedConfig } from '../config/types.js';
|
|
6
|
-
import type { Field, FieldAffectingData, RichTextField, Validate } from '../fields/config/types.js';
|
|
5
|
+
import type { Config, PayloadComponent, SanitizedConfig } from '../config/types.js';
|
|
6
|
+
import type { Field, FieldAffectingData, RichTextField, RichTextFieldClient, Validate } from '../fields/config/types.js';
|
|
7
7
|
import type { SanitizedGlobalConfig } from '../globals/config/types.js';
|
|
8
|
-
import type { JsonObject, PayloadRequest, RequestContext } from '../types/index.js';
|
|
9
|
-
import type {
|
|
10
|
-
|
|
11
|
-
path?: string;
|
|
12
|
-
} & Omit<RichTextField<Value, AdapterProps, ExtraFieldProperties>, 'type'>;
|
|
8
|
+
import type { JsonObject, Payload, PayloadRequest, RequestContext } from '../types/index.js';
|
|
9
|
+
import type { RichTextFieldProps } from './fields/RichText.js';
|
|
10
|
+
import type { CreateMappedComponent } from './types.js';
|
|
13
11
|
export type AfterReadRichTextHookArgs<TData extends TypeWithID = any, TValue = any, TSiblingData = any> = {
|
|
14
12
|
currentDepth?: number;
|
|
15
13
|
depth?: number;
|
|
@@ -108,15 +106,21 @@ export type RichTextHooks = {
|
|
|
108
106
|
beforeChange?: BeforeChangeRichTextHook[];
|
|
109
107
|
beforeValidate?: BeforeValidateRichTextHook[];
|
|
110
108
|
};
|
|
109
|
+
export type RichTextGenerateComponentMap = (args: {
|
|
110
|
+
clientField: RichTextFieldClient;
|
|
111
|
+
createMappedComponent: CreateMappedComponent;
|
|
112
|
+
field: RichTextField;
|
|
113
|
+
i18n: I18nClient;
|
|
114
|
+
importMap: ImportMap;
|
|
115
|
+
payload: Payload;
|
|
116
|
+
schemaPath: string;
|
|
117
|
+
}) => Map<string, unknown>;
|
|
111
118
|
type RichTextAdapterBase<Value extends object = object, AdapterProps = any, ExtraFieldProperties = {}> = {
|
|
112
|
-
generateComponentMap:
|
|
113
|
-
|
|
114
|
-
config: SanitizedConfig;
|
|
115
|
-
i18n: I18nClient;
|
|
116
|
-
schemaPath: string;
|
|
117
|
-
}) => Map<string, React.ReactNode>;
|
|
119
|
+
generateComponentMap: PayloadComponent<any, never>;
|
|
120
|
+
generateImportMap?: Config['admin']['importMap']['generators'][0];
|
|
118
121
|
generateSchemaMap?: (args: {
|
|
119
122
|
config: SanitizedConfig;
|
|
123
|
+
field: RichTextField;
|
|
120
124
|
i18n: I18n<any, any>;
|
|
121
125
|
schemaMap: Map<string, Field[]>;
|
|
122
126
|
schemaPath: string;
|
|
@@ -158,9 +162,9 @@ type RichTextAdapterBase<Value extends object = object, AdapterProps = any, Extr
|
|
|
158
162
|
}) => JSONSchema4;
|
|
159
163
|
validate: Validate<Value, Value, unknown, RichTextField<Value, AdapterProps, ExtraFieldProperties>>;
|
|
160
164
|
};
|
|
161
|
-
export type RichTextAdapter<Value extends object =
|
|
162
|
-
CellComponent:
|
|
163
|
-
FieldComponent:
|
|
165
|
+
export type RichTextAdapter<Value extends object = any, AdapterProps = any, ExtraFieldProperties = any> = {
|
|
166
|
+
CellComponent: PayloadComponent<never>;
|
|
167
|
+
FieldComponent: PayloadComponent<never, RichTextFieldProps>;
|
|
164
168
|
} & RichTextAdapterBase<Value, AdapterProps, ExtraFieldProperties>;
|
|
165
169
|
export type RichTextAdapterProvider<Value extends object = object, AdapterProps = any, ExtraFieldProperties = {}> = ({ config, isRoot, }: {
|
|
166
170
|
config: SanitizedConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichText.d.ts","sourceRoot":"","sources":["../../src/admin/RichText.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAClF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"RichText.d.ts","sourceRoot":"","sources":["../../src/admin/RichText.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM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AC,CAAA;AAElE,MAAM,MAAM,uBAAuB,CACjC,KAAK,SAAS,MAAM,GAAG,MAAM,EAC7B,YAAY,GAAG,GAAG,EAClB,oBAAoB,GAAG,EAAE,IACvB,CAAC,EACH,MAAM,EACN,MAAM,GACP,EAAE;IACD,MAAM,EAAE,eAAe,CAAA;IACvB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,KACG,OAAO,CAAC,eAAe,CAAC,KAAK,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAAC,GACnE,eAAe,CAAC,KAAK,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/admin/RichText.ts"],"sourcesContent":["import type { GenericLanguages, I18n, I18nClient } from '@payloadcms/translations'\nimport type { JSONSchema4 } from 'json-schema'\nimport type
|
|
1
|
+
{"version":3,"sources":["../../src/admin/RichText.ts"],"sourcesContent":["import type { GenericLanguages, I18n, I18nClient } from '@payloadcms/translations'\nimport type { JSONSchema4 } from 'json-schema'\n\nimport type { ImportMap } from '../bin/generateImportMap/index.js'\nimport type { SanitizedCollectionConfig, TypeWithID } from '../collections/config/types.js'\nimport type { Config, PayloadComponent, SanitizedConfig } from '../config/types.js'\nimport type {\n Field,\n FieldAffectingData,\n RichTextField,\n RichTextFieldClient,\n Validate,\n} from '../fields/config/types.js'\nimport type { SanitizedGlobalConfig } from '../globals/config/types.js'\nimport type { JsonObject, Payload, PayloadRequest, RequestContext } from '../types/index.js'\nimport type { RichTextFieldProps } from './fields/RichText.js'\nimport type { CreateMappedComponent } from './types.js'\n\nexport type AfterReadRichTextHookArgs<\n TData extends TypeWithID = any,\n TValue = any,\n TSiblingData = any,\n> = {\n currentDepth?: number\n\n depth?: number\n\n draft?: boolean\n\n fallbackLocale?: string\n\n fieldPromises?: Promise<void>[]\n\n /** Boolean to denote if this hook is running against finding one, or finding many within the afterRead hook. */\n findMany?: boolean\n\n flattenLocales?: boolean\n\n locale?: string\n\n /** A string relating to which operation the field type is currently executing within. */\n operation?: 'create' | 'delete' | 'read' | 'update'\n\n overrideAccess?: boolean\n\n populationPromises?: Promise<void>[]\n showHiddenFields?: boolean\n triggerAccessControl?: boolean\n triggerHooks?: boolean\n}\n\nexport type AfterChangeRichTextHookArgs<\n TData extends TypeWithID = any,\n TValue = any,\n TSiblingData = any,\n> = {\n /** A string relating to which operation the field type is currently executing within. */\n operation: 'create' | 'update'\n /** The document before changes were applied. */\n previousDoc?: TData\n /** The sibling data of the document before changes being applied. */\n previousSiblingDoc?: TData\n /** The previous value of the field, before changes */\n previousValue?: TValue\n}\nexport type BeforeValidateRichTextHookArgs<\n TData extends TypeWithID = any,\n TValue = any,\n TSiblingData = any,\n> = {\n /** A string relating to which operation the field type is currently executing within. */\n operation: 'create' | 'update'\n overrideAccess?: boolean\n /** The sibling data of the document before changes being applied. */\n previousSiblingDoc?: TData\n /** The previous value of the field, before changes */\n previousValue?: TValue\n}\n\nexport type BeforeChangeRichTextHookArgs<\n TData extends TypeWithID = any,\n TValue = any,\n TSiblingData = any,\n> = {\n /**\n * The original data with locales (not modified by any hooks). Only available in `beforeChange` and `beforeDuplicate` field hooks.\n */\n docWithLocales?: JsonObject\n\n duplicate?: boolean\n\n errors?: { field: string; message: string }[]\n /** Only available in `beforeChange` field hooks */\n mergeLocaleActions?: (() => Promise<void>)[]\n /** A string relating to which operation the field type is currently executing within. */\n operation?: 'create' | 'delete' | 'read' | 'update'\n /** The sibling data of the document before changes being applied. */\n previousSiblingDoc?: TData\n /** The previous value of the field, before changes */\n previousValue?: TValue\n /**\n * The original siblingData with locales (not modified by any hooks).\n */\n siblingDocWithLocales?: JsonObject\n\n skipValidation?: boolean\n}\n\nexport type BaseRichTextHookArgs<\n TData extends TypeWithID = any,\n TValue = any,\n TSiblingData = any,\n> = {\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<TData>\n /** The field which the hook is running against. */\n field: FieldAffectingData\n /** The global which the field belongs to. If the field belongs to a collection, this will be null. */\n global: SanitizedGlobalConfig | null\n\n /** The full original document in `update` operations. In the `afterChange` hook, this is the resulting document of the operation. */\n originalDoc?: TData\n /**\n * The path of the field, e.g. [\"group\", \"myArray\", 1, \"textField\"]. The path is the schemaPath but with indexes and would be used in the context of field data, not field schemas.\n */\n path: (number | string)[]\n\n /** The Express request object. It is mocked for Local API operations. */\n req: PayloadRequest\n /**\n * The schemaPath of the field, e.g. [\"group\", \"myArray\", \"textField\"]. The schemaPath is the path but without indexes and would be used in the context of field schemas, not field data.\n */\n schemaPath: string[]\n /** The sibling data passed to a field that the hook is running against. */\n siblingData: Partial<TSiblingData>\n /** The value of the field. */\n value?: TValue\n}\n\nexport type AfterReadRichTextHook<\n TData extends TypeWithID = any,\n TValue = any,\n TSiblingData = any,\n> = (\n args: AfterReadRichTextHookArgs<TData, TValue, TSiblingData> &\n BaseRichTextHookArgs<TData, TValue, TSiblingData>,\n) => Promise<TValue> | TValue\n\nexport type AfterChangeRichTextHook<\n TData extends TypeWithID = any,\n TValue = any,\n TSiblingData = any,\n> = (\n args: AfterChangeRichTextHookArgs<TData, TValue, TSiblingData> &\n BaseRichTextHookArgs<TData, TValue, TSiblingData>,\n) => Promise<TValue> | TValue\n\nexport type BeforeChangeRichTextHook<\n TData extends TypeWithID = any,\n TValue = any,\n TSiblingData = any,\n> = (\n args: BaseRichTextHookArgs<TData, TValue, TSiblingData> &\n BeforeChangeRichTextHookArgs<TData, TValue, TSiblingData>,\n) => Promise<TValue> | TValue\n\nexport type BeforeValidateRichTextHook<\n TData extends TypeWithID = any,\n TValue = any,\n TSiblingData = any,\n> = (\n args: BaseRichTextHookArgs<TData, TValue, TSiblingData> &\n BeforeValidateRichTextHookArgs<TData, TValue, TSiblingData>,\n) => Promise<TValue> | TValue\n\nexport type RichTextHooks = {\n afterChange?: AfterChangeRichTextHook[]\n afterRead?: AfterReadRichTextHook[]\n beforeChange?: BeforeChangeRichTextHook[]\n beforeValidate?: BeforeValidateRichTextHook[]\n}\n\nexport type RichTextGenerateComponentMap = (args: {\n clientField: RichTextFieldClient\n createMappedComponent: CreateMappedComponent\n field: RichTextField\n i18n: I18nClient\n\n importMap: ImportMap\n payload: Payload\n schemaPath: string\n}) => Map<string, unknown>\n\ntype RichTextAdapterBase<\n Value extends object = object,\n AdapterProps = any,\n ExtraFieldProperties = {},\n> = {\n generateComponentMap: PayloadComponent<any, never>\n generateImportMap?: Config['admin']['importMap']['generators'][0]\n generateSchemaMap?: (args: {\n config: SanitizedConfig\n field: RichTextField\n i18n: I18n<any, any>\n schemaMap: Map<string, Field[]>\n schemaPath: string\n }) => Map<string, Field[]>\n /**\n * Like an afterRead hook, but runs only for the GraphQL resolver. For populating data, this should be used, as afterRead hooks do not have a depth in graphQL.\n *\n * To populate stuff / resolve field hooks, mutate the incoming populationPromises or fieldPromises array. They will then be awaited in the correct order within payload itself.\n * @param data\n */\n graphQLPopulationPromises?: (data: {\n context: RequestContext\n currentDepth?: number\n depth: number\n draft: boolean\n field: RichTextField<Value, AdapterProps, ExtraFieldProperties>\n fieldPromises: Promise<void>[]\n findMany: boolean\n flattenLocales: boolean\n overrideAccess?: boolean\n populationPromises: Promise<void>[]\n req: PayloadRequest\n showHiddenFields: boolean\n siblingDoc: JsonObject\n }) => void\n hooks?: RichTextHooks\n i18n?: Partial<GenericLanguages>\n outputSchema?: ({\n collectionIDFieldTypes,\n config,\n field,\n interfaceNameDefinitions,\n isRequired,\n }: {\n collectionIDFieldTypes: { [key: string]: 'number' | 'string' }\n config?: SanitizedConfig\n field: RichTextField<Value, AdapterProps, ExtraFieldProperties>\n /**\n * Allows you to define new top-level interfaces that can be re-used in the output schema.\n */\n interfaceNameDefinitions: Map<string, JSONSchema4>\n isRequired: boolean\n }) => JSONSchema4\n validate: Validate<\n Value,\n Value,\n unknown,\n RichTextField<Value, AdapterProps, ExtraFieldProperties>\n >\n}\n\nexport type RichTextAdapter<\n Value extends object = any,\n AdapterProps = any,\n ExtraFieldProperties = any,\n> = {\n CellComponent: PayloadComponent<never>\n FieldComponent: PayloadComponent<never, RichTextFieldProps>\n} & RichTextAdapterBase<Value, AdapterProps, ExtraFieldProperties>\n\nexport type RichTextAdapterProvider<\n Value extends object = object,\n AdapterProps = any,\n ExtraFieldProperties = {},\n> = ({\n config,\n isRoot,\n}: {\n config: SanitizedConfig\n /**\n * Whether or not this is the root richText editor, defined in the payload.config.ts.\n *\n * @default false\n */\n isRoot?: boolean\n}) =>\n | Promise<RichTextAdapter<Value, AdapterProps, ExtraFieldProperties>>\n | RichTextAdapter<Value, AdapterProps, ExtraFieldProperties>\n"],"names":[],"mappings":"AA0QA,WAiB8D"}
|
|
@@ -1,37 +1,22 @@
|
|
|
1
1
|
import type { SanitizedCollectionConfig } from '../../collections/config/types.js';
|
|
2
|
-
import type {
|
|
3
|
-
import type { FormFieldBase } from '../types.js';
|
|
2
|
+
import type { ClientField } from '../../fields/config/client.js';
|
|
4
3
|
export type RowData = Record<string, any>;
|
|
5
|
-
export type CellComponentProps = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
className?: string;
|
|
11
|
-
dateDisplayFormat?: DateField['admin']['date']['displayFormat'];
|
|
12
|
-
displayPreview?: boolean;
|
|
13
|
-
fieldType?: Field['type'];
|
|
14
|
-
isFieldAffectingData?: boolean;
|
|
15
|
-
label?: FormFieldBase['label'];
|
|
16
|
-
labels?: Labels;
|
|
17
|
-
link?: boolean;
|
|
18
|
-
name: FieldBase['name'];
|
|
19
|
-
onClick?: (args: {
|
|
4
|
+
export type CellComponentProps<TField extends ClientField = ClientField> = {
|
|
5
|
+
readonly className?: string;
|
|
6
|
+
readonly field: TField;
|
|
7
|
+
readonly link?: boolean;
|
|
8
|
+
readonly onClick?: (args: {
|
|
20
9
|
cellData: unknown;
|
|
21
10
|
collectionSlug: SanitizedCollectionConfig['slug'];
|
|
22
11
|
rowData: RowData;
|
|
23
12
|
}) => void;
|
|
24
|
-
options?: SelectField['options'];
|
|
25
|
-
relationTo?: RelationshipField['relationTo'];
|
|
26
|
-
richTextComponentMap?: Map<string, React.ReactNode>;
|
|
27
|
-
schemaPath: string;
|
|
28
13
|
};
|
|
29
|
-
export type DefaultCellComponentProps<
|
|
30
|
-
cellData:
|
|
31
|
-
customCellContext?: {
|
|
14
|
+
export type DefaultCellComponentProps<TCellData = any, TField extends ClientField = ClientField> = {
|
|
15
|
+
readonly cellData: TCellData;
|
|
16
|
+
readonly customCellContext?: {
|
|
32
17
|
collectionSlug?: SanitizedCollectionConfig['slug'];
|
|
33
18
|
uploadConfig?: SanitizedCollectionConfig['upload'];
|
|
34
19
|
};
|
|
35
|
-
rowData: RowData;
|
|
36
|
-
} & CellComponentProps
|
|
20
|
+
readonly rowData: RowData;
|
|
21
|
+
} & CellComponentProps<TField>;
|
|
37
22
|
//# sourceMappingURL=Cell.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cell.d.ts","sourceRoot":"","sources":["../../../src/admin/elements/Cell.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAA;AAClF,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Cell.d.ts","sourceRoot":"","sources":["../../../src/admin/elements/Cell.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAA;AAClF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAEhE,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AAEzC,MAAM,MAAM,kBAAkB,CAAC,MAAM,SAAS,WAAW,GAAG,WAAW,IAAI;IACzE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE;QACxB,QAAQ,EAAE,OAAO,CAAA;QACjB,cAAc,EAAE,yBAAyB,CAAC,MAAM,CAAC,CAAA;QACjD,OAAO,EAAE,OAAO,CAAA;KACjB,KAAK,IAAI,CAAA;CACX,CAAA;AAED,MAAM,MAAM,yBAAyB,CAAC,SAAS,GAAG,GAAG,EAAE,MAAM,SAAS,WAAW,GAAG,WAAW,IAAI;IACjG,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;IAC5B,QAAQ,CAAC,iBAAiB,CAAC,EAAE;QAC3B,cAAc,CAAC,EAAE,yBAAyB,CAAC,MAAM,CAAC,CAAA;QAClD,YAAY,CAAC,EAAE,yBAAyB,CAAC,QAAQ,CAAC,CAAA;KACnD,CAAA;IACD,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAC1B,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/admin/elements/Cell.ts"],"sourcesContent":["import type { SanitizedCollectionConfig } from '../../collections/config/types.js'\nimport type {
|
|
1
|
+
{"version":3,"sources":["../../../src/admin/elements/Cell.ts"],"sourcesContent":["import type { SanitizedCollectionConfig } from '../../collections/config/types.js'\nimport type { ClientField } from '../../fields/config/client.js'\n\nexport type RowData = Record<string, any>\n\nexport type CellComponentProps<TField extends ClientField = ClientField> = {\n readonly className?: string\n readonly field: TField\n readonly link?: boolean\n readonly onClick?: (args: {\n cellData: unknown\n collectionSlug: SanitizedCollectionConfig['slug']\n rowData: RowData\n }) => void\n}\n\nexport type DefaultCellComponentProps<TCellData = any, TField extends ClientField = ClientField> = {\n readonly cellData: TCellData\n readonly customCellContext?: {\n collectionSlug?: SanitizedCollectionConfig['slug']\n uploadConfig?: SanitizedCollectionConfig['upload']\n }\n readonly rowData: RowData\n} & CellComponentProps<TField>\n"],"names":[],"mappings":"AAgBA,WAO8B"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import type { I18n } from '@payloadcms/translations';
|
|
2
2
|
import type { Permissions } from '../../auth/types.js';
|
|
3
3
|
import type { SanitizedCollectionConfig } from '../../collections/config/types.js';
|
|
4
|
-
import type { SanitizedConfig } from '../../config/types.js';
|
|
4
|
+
import type { PayloadComponent, SanitizedConfig } from '../../config/types.js';
|
|
5
5
|
import type { SanitizedGlobalConfig } from '../../globals/config/types.js';
|
|
6
|
+
import type { Payload } from '../../index.js';
|
|
6
7
|
export type DocumentTabProps = {
|
|
7
|
-
apiURL?: string;
|
|
8
|
-
collectionConfig?: SanitizedCollectionConfig;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
permissions: Permissions;
|
|
8
|
+
readonly apiURL?: string;
|
|
9
|
+
readonly collectionConfig?: SanitizedCollectionConfig;
|
|
10
|
+
readonly globalConfig?: SanitizedGlobalConfig;
|
|
11
|
+
readonly i18n: I18n;
|
|
12
|
+
readonly payload: Payload;
|
|
13
|
+
readonly permissions: Permissions;
|
|
13
14
|
};
|
|
14
15
|
export type DocumentTabCondition = (args: {
|
|
15
16
|
collectionConfig: SanitizedCollectionConfig;
|
|
@@ -18,25 +19,25 @@ export type DocumentTabCondition = (args: {
|
|
|
18
19
|
permissions: Permissions;
|
|
19
20
|
}) => boolean;
|
|
20
21
|
export type DocumentTabConfig = {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
readonly Component?: DocumentTabComponent;
|
|
23
|
+
readonly Pill?: PayloadComponent;
|
|
24
|
+
readonly condition?: DocumentTabCondition;
|
|
25
|
+
readonly href?: ((args: {
|
|
24
26
|
apiURL: string;
|
|
25
27
|
collection: SanitizedCollectionConfig;
|
|
26
28
|
global: SanitizedGlobalConfig;
|
|
27
29
|
id?: string;
|
|
28
30
|
routes: SanitizedConfig['routes'];
|
|
29
31
|
}) => string) | string;
|
|
30
|
-
isActive?: ((args: {
|
|
32
|
+
readonly isActive?: ((args: {
|
|
31
33
|
href: string;
|
|
32
34
|
}) => boolean) | boolean;
|
|
33
|
-
label?: ((args: {
|
|
35
|
+
readonly label?: ((args: {
|
|
34
36
|
t: (key: string) => string;
|
|
35
37
|
}) => string) | string;
|
|
36
|
-
newTab?: boolean;
|
|
38
|
+
readonly newTab?: boolean;
|
|
37
39
|
};
|
|
38
|
-
export type DocumentTabComponent =
|
|
40
|
+
export type DocumentTabComponent = PayloadComponent<{
|
|
39
41
|
path: string;
|
|
40
42
|
}>;
|
|
41
|
-
export type DocumentTab = DocumentTabComponent | DocumentTabConfig;
|
|
42
43
|
//# sourceMappingURL=Tab.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tab.d.ts","sourceRoot":"","sources":["../../../src/admin/elements/Tab.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AAEpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAA;AAClF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"Tab.d.ts","sourceRoot":"","sources":["../../../src/admin/elements/Tab.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AAEpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAA;AAClF,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC9E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AAC1E,OAAO,KAAK,EAAE,OAAO,E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AC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAA;KAAE,KAAK,MAAM,CAAC,GAAG,MAAM,CAAA;IAC5E,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,CAAC;IAClD,IAAI,EAAE,MAAM,CAAA;CACb,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/admin/elements/Tab.ts"],"sourcesContent":["import type { I18n } from '@payloadcms/translations'\n\nimport type { Permissions } from '../../auth/types.js'\nimport type { SanitizedCollectionConfig } from '../../collections/config/types.js'\nimport type { SanitizedConfig } from '../../config/types.js'\nimport type { SanitizedGlobalConfig } from '../../globals/config/types.js'\n\nexport type DocumentTabProps = {\n apiURL?: string\n collectionConfig?: SanitizedCollectionConfig\n
|
|
1
|
+
{"version":3,"sources":["../../../src/admin/elements/Tab.ts"],"sourcesContent":["import type { I18n } from '@payloadcms/translations'\n\nimport type { Permissions } from '../../auth/types.js'\nimport type { SanitizedCollectionConfig } from '../../collections/config/types.js'\nimport type { PayloadComponent, SanitizedConfig } from '../../config/types.js'\nimport type { SanitizedGlobalConfig } from '../../globals/config/types.js'\nimport type { Payload } from '../../index.js'\n\nexport type DocumentTabProps = {\n readonly apiURL?: string\n readonly collectionConfig?: SanitizedCollectionConfig\n readonly globalConfig?: SanitizedGlobalConfig\n readonly i18n: I18n\n readonly payload: Payload\n readonly permissions: Permissions\n}\n\nexport type DocumentTabCondition = (args: {\n collectionConfig: SanitizedCollectionConfig\n config: SanitizedConfig\n globalConfig: SanitizedGlobalConfig\n permissions: Permissions\n}) => boolean\n\n// Everything is optional because we merge in the defaults\n// i.e. the config may override the `Default` view with a `label` but not an `href`\nexport type DocumentTabConfig = {\n readonly Component?: DocumentTabComponent\n readonly Pill?: PayloadComponent\n readonly condition?: DocumentTabCondition\n readonly href?:\n | ((args: {\n apiURL: string\n collection: SanitizedCollectionConfig\n global: SanitizedGlobalConfig\n id?: string\n routes: SanitizedConfig['routes']\n }) => string)\n | string\n readonly isActive?: ((args: { href: string }) => boolean) | boolean\n readonly label?: ((args: { t: (key: string) => string }) => string) | string\n readonly newTab?: boolean\n}\n\nexport type DocumentTabComponent = PayloadComponent<{\n path: string\n}>\n"],"names":[],"mappings":"AA4CA,WAEE"}
|
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { MarkOptional } from 'ts-essentials';
|
|
2
|
+
import type { ArrayField, ArrayFieldClient } from '../../fields/config/types.js';
|
|
2
3
|
import type { ArrayFieldValidation } from '../../fields/validations.js';
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
|
|
4
|
+
import type { FieldErrorClientComponent, FieldErrorServerComponent } from '../forms/Error.js';
|
|
5
|
+
import type { FieldDescriptionClientComponent, FieldDescriptionServerComponent, FieldLabelClientComponent, FieldLabelServerComponent, FormFieldBase, MappedComponent } from '../types.js';
|
|
6
|
+
type ArrayFieldClientWithoutType = MarkOptional<ArrayFieldClient, 'type'>;
|
|
6
7
|
export type ArrayFieldProps = {
|
|
7
|
-
CustomRowLabel?:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} & FormFieldBase;
|
|
18
|
-
export type ArrayFieldLabelComponent = LabelComponent<'array'>;
|
|
19
|
-
export type ArrayFieldDescriptionComponent = DescriptionComponent<'array'>;
|
|
20
|
-
export type ArrayFieldErrorComponent = ErrorComponent<'array'>;
|
|
8
|
+
readonly CustomRowLabel?: MappedComponent;
|
|
9
|
+
readonly validate?: ArrayFieldValidation;
|
|
10
|
+
} & Omit<FormFieldBase<ArrayFieldClientWithoutType>, 'validate'>;
|
|
11
|
+
export type ArrayFieldLabelServerComponent = FieldLabelServerComponent<ArrayField>;
|
|
12
|
+
export type ArrayFieldLabelClientComponent = FieldLabelClientComponent<ArrayFieldClientWithoutType>;
|
|
13
|
+
export type ArrayFieldDescriptionServerComponent = FieldDescriptionServerComponent<ArrayField>;
|
|
14
|
+
export type ArrayFieldDescriptionClientComponent = FieldDescriptionClientComponent<ArrayFieldClientWithoutType>;
|
|
15
|
+
export type ArrayFieldErrorServerComponent = FieldErrorServerComponent<ArrayField>;
|
|
16
|
+
export type ArrayFieldErrorClientComponent = FieldErrorClientComponent<ArrayFieldClientWithoutType>;
|
|
17
|
+
export {};
|
|
21
18
|
//# sourceMappingURL=Array.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Array.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Array.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Array.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Array.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAChF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AACvE,OAAO,KAAK,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAA;AAC7F,OAAO,KAAK,EACV,+BAA+B,EAC/B,+BAA+B,EAC/B,yBAAyB,EACzB,yBAAyB,EACzB,aAAa,EACb,eAAe,EAChB,MAAM,aAAa,CAAA;AAEpB,KAAK,2BAA2B,GAAG,YAAY,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAA;AAEzE,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,cAAc,CAAC,EAAE,eAAe,CAAA;IACzC,QAAQ,CAAC,QAAQ,CAAC,EAAE,oBAAoB,CAAA;CACzC,GAAG,IAAI,CAAC,aAAa,CAAC,2BAA2B,CAAC,EAAE,UAAU,CAAC,CAAA;AAEhE,MAAM,MAAM,8BAA8B,GAAG,yBAAyB,CAAC,UAAU,CAAC,CAAA;AAElF,MAAM,MAAM,8BAA8B,GAAG,yBAAyB,CAAC,2BAA2B,CAAC,CAAA;AAEnG,MAAM,MAAM,oCAAoC,GAAG,+BAA+B,CAAC,UAAU,CAAC,CAAA;AAE9F,MAAM,MAAM,oCAAoC,GAC9C,+BAA+B,CAAC,2BAA2B,CAAC,CAAA;AAE9D,MAAM,MAAM,8BAA8B,GAAG,yBAAyB,CAAC,UAAU,CAAC,CAAA;AAElF,MAAM,MAAM,8BAA8B,GAAG,yBAAyB,CAAC,2BAA2B,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/admin/fields/Array.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"sources":["../../../src/admin/fields/Array.ts"],"sourcesContent":["import type { MarkOptional } from 'ts-essentials'\n\nimport type { ArrayField, ArrayFieldClient } from '../../fields/config/types.js'\nimport type { ArrayFieldValidation } from '../../fields/validations.js'\nimport type { FieldErrorClientComponent, FieldErrorServerComponent } from '../forms/Error.js'\nimport type {\n FieldDescriptionClientComponent,\n FieldDescriptionServerComponent,\n FieldLabelClientComponent,\n FieldLabelServerComponent,\n FormFieldBase,\n MappedComponent,\n} from '../types.js'\n\ntype ArrayFieldClientWithoutType = MarkOptional<ArrayFieldClient, 'type'>\n\nexport type ArrayFieldProps = {\n readonly CustomRowLabel?: MappedComponent\n readonly validate?: ArrayFieldValidation\n} & Omit<FormFieldBase<ArrayFieldClientWithoutType>, 'validate'>\n\nexport type ArrayFieldLabelServerComponent = FieldLabelServerComponent<ArrayField>\n\nexport type ArrayFieldLabelClientComponent = FieldLabelClientComponent<ArrayFieldClientWithoutType>\n\nexport type ArrayFieldDescriptionServerComponent = FieldDescriptionServerComponent<ArrayField>\n\nexport type ArrayFieldDescriptionClientComponent =\n FieldDescriptionClientComponent<ArrayFieldClientWithoutType>\n\nexport type ArrayFieldErrorServerComponent = FieldErrorServerComponent<ArrayField>\n\nexport type ArrayFieldErrorClientComponent = FieldErrorClientComponent<ArrayFieldClientWithoutType>\n"],"names":[],"mappings":"AAgCA,WAAmG"}
|
|
@@ -1,30 +1,17 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { MarkOptional } from 'ts-essentials';
|
|
2
|
+
import type { BlockField, BlockFieldClient } from '../../fields/config/types.js';
|
|
2
3
|
import type { BlockFieldValidation } from '../../fields/validations.js';
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
|
|
6
|
-
export type
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
width?: string;
|
|
17
|
-
} & FormFieldBase;
|
|
18
|
-
export type ReducedBlock = {
|
|
19
|
-
LabelComponent: Block['admin']['components']['Label'];
|
|
20
|
-
custom?: Record<any, string>;
|
|
21
|
-
fieldMap: FieldMap;
|
|
22
|
-
imageAltText?: string;
|
|
23
|
-
imageURL?: string;
|
|
24
|
-
labels: BlockField['labels'];
|
|
25
|
-
slug: string;
|
|
26
|
-
};
|
|
27
|
-
export type BlocksFieldLabelComponent = LabelComponent<'blocks'>;
|
|
28
|
-
export type BlocksFieldDescriptionComponent = DescriptionComponent<'blocks'>;
|
|
29
|
-
export type BlocksFieldErrorComponent = ErrorComponent<'blocks'>;
|
|
4
|
+
import type { FieldErrorClientComponent, FieldErrorServerComponent } from '../forms/Error.js';
|
|
5
|
+
import type { FieldDescriptionClientComponent, FieldDescriptionServerComponent, FieldLabelClientComponent, FieldLabelServerComponent, FormFieldBase } from '../types.js';
|
|
6
|
+
type BlocksFieldClientWithoutType = MarkOptional<BlockFieldClient, 'type'>;
|
|
7
|
+
export type BlockFieldProps = {
|
|
8
|
+
readonly validate?: BlockFieldValidation;
|
|
9
|
+
} & Omit<FormFieldBase<BlocksFieldClientWithoutType>, 'validate'>;
|
|
10
|
+
export type BlockFieldLabelServerComponent = FieldLabelServerComponent<BlockField>;
|
|
11
|
+
export type BlockFieldLabelClientComponent = FieldLabelClientComponent<BlocksFieldClientWithoutType>;
|
|
12
|
+
export type BlockFieldDescriptionServerComponent = FieldDescriptionServerComponent<BlockField>;
|
|
13
|
+
export type BlockFieldDescriptionClientComponent = FieldDescriptionClientComponent<BlocksFieldClientWithoutType>;
|
|
14
|
+
export type BlockFieldErrorServerComponent = FieldErrorServerComponent<BlockField>;
|
|
15
|
+
export type BlockFieldErrorClientComponent = FieldErrorClientComponent<BlocksFieldClientWithoutType>;
|
|
16
|
+
export {};
|
|
30
17
|
//# sourceMappingURL=Blocks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Blocks.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Blocks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Blocks.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Blocks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAChF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AACvE,OAAO,KAAK,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAA;AAC7F,OAAO,KAAK,EACV,+BAA+B,EAC/B,+BAA+B,EAC/B,yBAAyB,EACzB,yBAAyB,EACzB,aAAa,EACd,MAAM,aAAa,CAAA;AAEpB,KAAK,4BAA4B,GAAG,YAAY,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAA;AAE1E,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,oBAAoB,CAAA;CACzC,GAAG,IAAI,CAAC,aAAa,CAAC,4BAA4B,CAAC,EAAE,UAAU,CAAC,CAAA;AAEjE,MAAM,MAAM,8BAA8B,GAAG,yBAAyB,CAAC,UAAU,CAAC,CAAA;AAElF,MAAM,MAAM,8BAA8B,GAAG,yBAAyB,CAAC,4BAA4B,CAAC,CAAA;AAEpG,MAAM,MAAM,oCAAoC,GAAG,+BAA+B,CAAC,UAAU,CAAC,CAAA;AAE9F,MAAM,MAAM,oCAAoC,GAC9C,+BAA+B,CAAC,4BAA4B,CAAC,CAAA;AAE/D,MAAM,MAAM,8BAA8B,GAAG,yBAAyB,CAAC,UAAU,CAAC,CAAA;AAElF,MAAM,MAAM,8BAA8B,GAAG,yBAAyB,CAAC,4BAA4B,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/admin/fields/Blocks.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"sources":["../../../src/admin/fields/Blocks.ts"],"sourcesContent":["import type { MarkOptional } from 'ts-essentials'\n\nimport type { BlockField, BlockFieldClient } from '../../fields/config/types.js'\nimport type { BlockFieldValidation } from '../../fields/validations.js'\nimport type { FieldErrorClientComponent, FieldErrorServerComponent } from '../forms/Error.js'\nimport type {\n FieldDescriptionClientComponent,\n FieldDescriptionServerComponent,\n FieldLabelClientComponent,\n FieldLabelServerComponent,\n FormFieldBase,\n} from '../types.js'\n\ntype BlocksFieldClientWithoutType = MarkOptional<BlockFieldClient, 'type'>\n\nexport type BlockFieldProps = {\n readonly validate?: BlockFieldValidation\n} & Omit<FormFieldBase<BlocksFieldClientWithoutType>, 'validate'>\n\nexport type BlockFieldLabelServerComponent = FieldLabelServerComponent<BlockField>\n\nexport type BlockFieldLabelClientComponent = FieldLabelClientComponent<BlocksFieldClientWithoutType>\n\nexport type BlockFieldDescriptionServerComponent = FieldDescriptionServerComponent<BlockField>\n\nexport type BlockFieldDescriptionClientComponent =\n FieldDescriptionClientComponent<BlocksFieldClientWithoutType>\n\nexport type BlockFieldErrorServerComponent = FieldErrorServerComponent<BlockField>\n\nexport type BlockFieldErrorClientComponent = FieldErrorClientComponent<BlocksFieldClientWithoutType>\n"],"names":[],"mappings":"AA8BA,WAAoG"}
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
+
import type { MarkOptional } from 'ts-essentials';
|
|
2
|
+
import type { CheckboxField, CheckboxFieldClient } from '../../fields/config/types.js';
|
|
1
3
|
import type { CheckboxFieldValidation } from '../../fields/validations.js';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
+
import type { FieldErrorClientComponent, FieldErrorServerComponent } from '../forms/Error.js';
|
|
5
|
+
import type { FieldDescriptionClientComponent, FieldDescriptionServerComponent, FieldLabelClientComponent, FieldLabelServerComponent, FormFieldBase } from '../types.js';
|
|
6
|
+
type CheckboxFieldClientWithoutType = MarkOptional<CheckboxFieldClient, 'type'>;
|
|
4
7
|
export type CheckboxFieldProps = {
|
|
5
|
-
checked?: boolean;
|
|
6
|
-
disableFormData?: boolean;
|
|
7
|
-
id?: string;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export type
|
|
16
|
-
export type
|
|
17
|
-
export type
|
|
8
|
+
readonly checked?: boolean;
|
|
9
|
+
readonly disableFormData?: boolean;
|
|
10
|
+
readonly id?: string;
|
|
11
|
+
readonly onChange?: (value: boolean) => void;
|
|
12
|
+
readonly partialChecked?: boolean;
|
|
13
|
+
readonly validate?: CheckboxFieldValidation;
|
|
14
|
+
} & Omit<FormFieldBase<CheckboxFieldClientWithoutType>, 'validate'>;
|
|
15
|
+
export type CheckboxFieldLabelServerComponent = FieldLabelServerComponent<CheckboxField>;
|
|
16
|
+
export type CheckboxFieldLabelClientComponent = FieldLabelClientComponent<CheckboxFieldClientWithoutType>;
|
|
17
|
+
export type CheckboxFieldDescriptionServerComponent = FieldDescriptionServerComponent<CheckboxField>;
|
|
18
|
+
export type CheckboxFieldDescriptionClientComponent = FieldDescriptionClientComponent<CheckboxFieldClientWithoutType>;
|
|
19
|
+
export type CheckboxFieldErrorServerComponent = FieldErrorServerComponent<CheckboxField>;
|
|
20
|
+
export type CheckboxFieldErrorClientComponent = FieldErrorClientComponent<CheckboxFieldClientWithoutType>;
|
|
21
|
+
export {};
|
|
18
22
|
//# sourceMappingURL=Checkbox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Checkbox.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AAC1E,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Checkbox.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAA;AACtF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AAC1E,OAAO,KAAK,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAA;AAC7F,OAAO,KAAK,EACV,+BAA+B,EAC/B,+BAA+B,EAC/B,yBAAyB,EACzB,yBAAyB,EACzB,aAAa,EACd,MAAM,aAAa,CAAA;AAEpB,KAAK,8BAA8B,GAAG,YAAY,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAA;AAE/E,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAA;IAClC,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;IAC5C,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAA;IACjC,QAAQ,CAAC,QAAQ,CAAC,EAAE,uBAAuB,CAAA;CAC5C,GAAG,IAAI,CAAC,aAAa,CAAC,8BAA8B,CAAC,EAAE,UAAU,CAAC,CAAA;AAEnE,MAAM,MAAM,iCAAiC,GAAG,yBAAyB,CAAC,aAAa,CAAC,CAAA;AAExF,MAAM,MAAM,iCAAiC,GAC3C,yBAAyB,CAAC,8BAA8B,CAAC,CAAA;AAE3D,MAAM,MAAM,uCAAuC,GAAG,+BAA+B,CAAC,aAAa,CAAC,CAAA;AAEpG,MAAM,MAAM,uCAAuC,GACjD,+BAA+B,CAAC,8BAA8B,CAAC,CAAA;AAEjE,MAAM,MAAM,iCAAiC,GAAG,yBAAyB,CAAC,aAAa,CAAC,CAAA;AAExF,MAAM,MAAM,iCAAiC,GAC3C,yBAAyB,CAAC,8BAA8B,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/admin/fields/Checkbox.ts"],"sourcesContent":["import type { CheckboxFieldValidation } from '../../fields/validations.js'\nimport type {
|
|
1
|
+
{"version":3,"sources":["../../../src/admin/fields/Checkbox.ts"],"sourcesContent":["import type { MarkOptional } from 'ts-essentials'\n\nimport type { CheckboxField, CheckboxFieldClient } from '../../fields/config/types.js'\nimport type { CheckboxFieldValidation } from '../../fields/validations.js'\nimport type { FieldErrorClientComponent, FieldErrorServerComponent } from '../forms/Error.js'\nimport type {\n FieldDescriptionClientComponent,\n FieldDescriptionServerComponent,\n FieldLabelClientComponent,\n FieldLabelServerComponent,\n FormFieldBase,\n} from '../types.js'\n\ntype CheckboxFieldClientWithoutType = MarkOptional<CheckboxFieldClient, 'type'>\n\nexport type CheckboxFieldProps = {\n readonly checked?: boolean\n readonly disableFormData?: boolean\n readonly id?: string\n readonly onChange?: (value: boolean) => void\n readonly partialChecked?: boolean\n readonly validate?: CheckboxFieldValidation\n} & Omit<FormFieldBase<CheckboxFieldClientWithoutType>, 'validate'>\n\nexport type CheckboxFieldLabelServerComponent = FieldLabelServerComponent<CheckboxField>\n\nexport type CheckboxFieldLabelClientComponent =\n FieldLabelClientComponent<CheckboxFieldClientWithoutType>\n\nexport type CheckboxFieldDescriptionServerComponent = FieldDescriptionServerComponent<CheckboxField>\n\nexport type CheckboxFieldDescriptionClientComponent =\n FieldDescriptionClientComponent<CheckboxFieldClientWithoutType>\n\nexport type CheckboxFieldErrorServerComponent = FieldErrorServerComponent<CheckboxField>\n\nexport type CheckboxFieldErrorClientComponent =\n FieldErrorClientComponent<CheckboxFieldClientWithoutType>\n"],"names":[],"mappings":"AAoCA,WAC2D"}
|