payload 3.0.0-beta.78 → 3.0.0-beta.79
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 +33 -10
- package/dist/admin/RichText.d.ts +20 -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 +6 -13
- 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 +8 -25
- 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 +9 -9
- 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 +5 -7
- 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 +3 -4
- 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 +4 -7
- 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 +5 -7
- 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 +3 -6
- 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 +7 -5
- 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 +4 -7
- 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 +5 -12
- 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 +4 -6
- 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 +6 -9
- 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 +4 -9
- 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 +5 -6
- 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 +3 -4
- 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 +6 -11
- 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 +8 -12
- 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 +7 -13
- 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 +7 -9
- 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 +6 -7
- package/dist/admin/fields/Upload.d.ts.map +1 -1
- package/dist/admin/fields/Upload.js.map +1 -1
- package/dist/admin/forms/Error.d.ts +10 -10
- 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 +17 -24
- package/dist/admin/forms/Field.d.ts.map +1 -1
- package/dist/admin/forms/Field.js +1 -0
- package/dist/admin/forms/Field.js.map +1 -1
- package/dist/admin/forms/FieldDescription.d.ts +10 -9
- package/dist/admin/forms/FieldDescription.d.ts.map +1 -1
- package/dist/admin/forms/FieldDescription.js.map +1 -1
- package/dist/admin/forms/Label.d.ts +14 -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 +30 -11
- package/dist/admin/types.d.ts.map +1 -1
- package/dist/admin/types.js.map +1 -1
- package/dist/admin/views/types.d.ts +21 -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/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 +19 -0
- package/dist/bin/generateImportMap/parsePayloadComponent.js.map +1 -0
- package/dist/bin/index.d.ts.map +1 -1
- package/dist/bin/index.js +35 -4
- package/dist/bin/index.js.map +1 -1
- package/dist/collections/config/client.d.ts +32 -308
- package/dist/collections/config/client.d.ts.map +1 -1
- package/dist/collections/config/client.js +1 -82
- package/dist/collections/config/client.js.map +1 -1
- package/dist/collections/config/types.d.ts +9 -9
- 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/types.d.ts +111 -52
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/types.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 +2 -1
- package/dist/exports/shared.d.ts.map +1 -1
- package/dist/exports/shared.js +2 -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 +385 -56
- 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/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 +3 -3
- package/dist/globals/config/types.js.map +1 -1
- package/dist/index.d.ts +15 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -7
- 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/types.d.ts +4 -0
- package/dist/uploads/types.d.ts.map +1 -1
- package/dist/uploads/types.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 +5 -5
- 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 +3 -10
- 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/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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Textarea.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Textarea.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAA;AACvE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AAC1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEtF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAA;IACzD,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAA;IAC/C,QAAQ,CAAC,SAAS,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,CAAA;IACjE,QAAQ,CAAC,QAAQ,CAAC,EAAE,uBAAuB,CAAA;CAC5C,GAAG,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAA;AAEnC,MAAM,MAAM,2BAA2B,GAAG,cAAc,CAAC,UAAU,CAAC,CAAA;AAEpE,MAAM,MAAM,iCAAiC,GAAG,oBAAoB,CAAC,UAAU,CAAC,CAAA;AAEhF,MAAM,MAAM,2BAA2B,GAAG,cAAc,CAAC,UAAU,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/admin/fields/Textarea.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"sources":["../../../src/admin/fields/Textarea.ts"],"sourcesContent":["import type React from 'react'\nimport type { MarkOptional } from 'ts-essentials'\n\nimport type { TextareaFieldClient } from '../../fields/config/types.js'\nimport type { TextareaFieldValidation } from '../../fields/validations.js'\nimport type { ErrorComponent } from '../forms/Error.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type TextareaFieldProps = {\n readonly field: MarkOptional<TextareaFieldClient, 'type'>\n readonly inputRef?: React.Ref<HTMLInputElement>\n readonly onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>\n readonly validate?: TextareaFieldValidation\n} & Omit<FormFieldBase, 'validate'>\n\nexport type TextareaFieldLabelComponent = LabelComponent<'textarea'>\n\nexport type TextareaFieldDescriptionComponent = DescriptionComponent<'textarea'>\n\nexport type TextareaFieldErrorComponent = ErrorComponent<'textarea'>\n"],"names":[],"mappings":"AAmBA,WAAoE"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { MarkOptional } from 'ts-essentials';
|
|
2
|
+
import type { UploadFieldClient } from '../../fields/config/types.js';
|
|
3
|
+
import type { UploadFieldValidation } from '../../fields/validations.js';
|
|
2
4
|
import type { ErrorComponent } from '../forms/Error.js';
|
|
5
|
+
import type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js';
|
|
3
6
|
export type UploadFieldProps = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
path?: string;
|
|
7
|
-
relationTo?: UploadField['relationTo'];
|
|
8
|
-
validate?: UploadFieldValidation;
|
|
9
|
-
width?: string;
|
|
7
|
+
readonly field: MarkOptional<UploadFieldClient, 'type'>;
|
|
8
|
+
readonly validate?: UploadFieldValidation;
|
|
10
9
|
} & Omit<FormFieldBase, 'validate'>;
|
|
11
10
|
export type UploadFieldLabelComponent = LabelComponent<'upload'>;
|
|
12
11
|
export type UploadFieldDescriptionComponent = DescriptionComponent<'upload'>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Upload.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Upload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Upload.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Upload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AACrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEtF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAA;IACvD,QAAQ,CAAC,QAAQ,CAAC,EAAE,qBAAqB,CAAA;CAC1C,GAAG,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAA;AAEnC,MAAM,MAAM,yBAAyB,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAA;AAEhE,MAAM,MAAM,+BAA+B,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAA;AAE5E,MAAM,MAAM,yBAAyB,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/admin/fields/Upload.ts"],"sourcesContent":["import type {\n
|
|
1
|
+
{"version":3,"sources":["../../../src/admin/fields/Upload.ts"],"sourcesContent":["import type { MarkOptional } from 'ts-essentials'\n\nimport type { UploadFieldClient } from '../../fields/config/types.js'\nimport type { UploadFieldValidation } from '../../fields/validations.js'\nimport type { ErrorComponent } from '../forms/Error.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type UploadFieldProps = {\n readonly field: MarkOptional<UploadFieldClient, 'type'>\n readonly validate?: UploadFieldValidation\n} & Omit<FormFieldBase, 'validate'>\n\nexport type UploadFieldLabelComponent = LabelComponent<'upload'>\n\nexport type UploadFieldDescriptionComponent = DescriptionComponent<'upload'>\n\nexport type UploadFieldErrorComponent = ErrorComponent<'upload'>\n"],"names":[],"mappings":"AAgBA,WAAgE"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { CustomComponent, ServerProps } from '../../config/types.js';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
2
|
+
import type { FieldTypes } from '../../fields/config/types.js';
|
|
3
|
+
import type { MappedComponent } from '../types.js';
|
|
4
4
|
export type GenericErrorProps = {
|
|
5
|
-
CustomError?:
|
|
6
|
-
alignCaret?: 'center' | 'left' | 'right';
|
|
7
|
-
message?: string;
|
|
8
|
-
path?: string;
|
|
9
|
-
showError?: boolean;
|
|
5
|
+
readonly CustomError?: MappedComponent;
|
|
6
|
+
readonly alignCaret?: 'center' | 'left' | 'right';
|
|
7
|
+
readonly message?: string;
|
|
8
|
+
readonly path?: string;
|
|
9
|
+
readonly showError?: boolean;
|
|
10
10
|
};
|
|
11
|
-
export type ErrorProps<T extends
|
|
11
|
+
export type ErrorProps<T extends 'hidden' | FieldTypes = any> = {
|
|
12
12
|
type: T;
|
|
13
|
-
} &
|
|
14
|
-
export type ErrorComponent<T extends
|
|
13
|
+
} & GenericErrorProps & Partial<ServerProps>;
|
|
14
|
+
export type ErrorComponent<T extends 'hidden' | FieldTypes = any> = CustomComponent<ErrorProps<T>>;
|
|
15
15
|
//# sourceMappingURL=Error.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Error.d.ts","sourceRoot":"","sources":["../../../src/admin/forms/Error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACzE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Error.d.ts","sourceRoot":"","sources":["../../../src/admin/forms/Error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAElD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,WAAW,CAAC,EAAE,eAAe,CAAA;IACtC,QAAQ,CAAC,UAAU,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAA;IACjD,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAC7B,CAAA;AAED,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,QAAQ,GAAG,UAAU,GAAG,GAAG,IAAI;IAC9D,IAAI,EAAE,CAAC,CAAA;CACR,GAAG,iBAAiB,GACnB,OAAO,CAAC,WAAW,CAAC,CAAA;AAEtB,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,QAAQ,GAAG,UAAU,GAAG,GAAG,IAAI,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/admin/forms/Error.ts"],"sourcesContent":["import type { CustomComponent, ServerProps } from '../../config/types.js'\nimport type {
|
|
1
|
+
{"version":3,"sources":["../../../src/admin/forms/Error.ts"],"sourcesContent":["import type { CustomComponent, ServerProps } from '../../config/types.js'\nimport type { FieldTypes } from '../../fields/config/types.js'\nimport type { MappedComponent } from '../types.js'\n\nexport type GenericErrorProps = {\n readonly CustomError?: MappedComponent\n readonly alignCaret?: 'center' | 'left' | 'right'\n readonly message?: string\n readonly path?: string\n readonly showError?: boolean\n}\n\nexport type ErrorProps<T extends 'hidden' | FieldTypes = any> = {\n type: T\n} & GenericErrorProps &\n Partial<ServerProps>\n\nexport type ErrorComponent<T extends 'hidden' | FieldTypes = any> = CustomComponent<ErrorProps<T>>\n"],"names":[],"mappings":"AAiBA,WAAkG"}
|
|
@@ -1,32 +1,25 @@
|
|
|
1
1
|
import type { User } from '../../auth/types.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { Locale } from '../../config/types.js';
|
|
3
3
|
import type { Validate } from '../../fields/config/types.js';
|
|
4
4
|
import type { DocumentPreferences } from '../../preferences/types.js';
|
|
5
5
|
import type { ErrorProps } from './Error.js';
|
|
6
6
|
import type { FieldDescriptionProps } from './FieldDescription.js';
|
|
7
|
-
import type {
|
|
7
|
+
import type { LabelProps } from './Label.js';
|
|
8
8
|
export type FormFieldBase = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
path?: string;
|
|
25
|
-
readOnly?: boolean;
|
|
26
|
-
required?: boolean;
|
|
27
|
-
rtl?: boolean;
|
|
28
|
-
style?: React.CSSProperties;
|
|
29
|
-
user?: User;
|
|
30
|
-
validate?: Validate;
|
|
9
|
+
readonly descriptionProps?: FieldDescriptionProps;
|
|
10
|
+
readonly docPreferences?: DocumentPreferences;
|
|
11
|
+
readonly errorProps?: ErrorProps;
|
|
12
|
+
/**
|
|
13
|
+
* forceRender is added by RenderField automatically
|
|
14
|
+
*/
|
|
15
|
+
readonly forceRender?: boolean;
|
|
16
|
+
readonly labelProps?: LabelProps;
|
|
17
|
+
readonly locale?: Locale;
|
|
18
|
+
/**
|
|
19
|
+
* forceRender is added by RenderField automatically. This should be used instead of field.admin.readOnly
|
|
20
|
+
*/
|
|
21
|
+
readonly readOnly?: boolean;
|
|
22
|
+
readonly user?: User;
|
|
23
|
+
readonly validate?: Validate;
|
|
31
24
|
};
|
|
32
25
|
//# sourceMappingURL=Field.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../../../src/admin/forms/Field.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../../../src/admin/forms/Field.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAA;AAC5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAG5C,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,gBAAgB,CAAC,EAAE,qBAAqB,CAAA;IACjD,QAAQ,CAAC,cAAc,CAAC,EAAE,mBAAmB,CAAA;IAC7C,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,CAAA;IAChC;;OAEG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAA;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,CAAA;IAChC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB;;OAEG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,CAAA;IACpB,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAA;CAC7B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/admin/forms/Field.ts"],"sourcesContent":["import type { User } from '../../auth/types.js'\nimport type {
|
|
1
|
+
{"version":3,"sources":["../../../src/admin/forms/Field.ts"],"sourcesContent":["import type { User } from '../../auth/types.js'\nimport type { Locale } from '../../config/types.js'\nimport type { Validate } from '../../fields/config/types.js'\nimport type { DocumentPreferences } from '../../preferences/types.js'\nimport type { ErrorProps } from './Error.js'\nimport type { FieldDescriptionProps } from './FieldDescription.js'\nimport type { LabelProps } from './Label.js'\n\n// TODO: Check if we still need this. Shouldnt most of it be present in the field type?\nexport type FormFieldBase = {\n readonly descriptionProps?: FieldDescriptionProps\n readonly docPreferences?: DocumentPreferences\n readonly errorProps?: ErrorProps\n /**\n * forceRender is added by RenderField automatically\n */\n readonly forceRender?: boolean\n readonly labelProps?: LabelProps\n readonly locale?: Locale\n /**\n * forceRender is added by RenderField automatically. This should be used instead of field.admin.readOnly\n */\n readonly readOnly?: boolean\n readonly user?: User\n readonly validate?: Validate\n}\n"],"names":[],"mappings":"AAQA,uFAAuF;AACvF,WAgBC"}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
1
|
import type { CustomComponent, LabelFunction, ServerProps } from '../../config/types.js';
|
|
3
|
-
import type { FieldTypes } from '
|
|
2
|
+
import type { FieldTypes } from '../../fields/config/types.js';
|
|
3
|
+
import type { MappedComponent } from '../types.js';
|
|
4
4
|
export type DescriptionFunction = LabelFunction;
|
|
5
|
-
export type DescriptionComponent<T extends
|
|
6
|
-
export type
|
|
5
|
+
export type DescriptionComponent<T extends 'hidden' | FieldTypes = any> = CustomComponent<FieldDescriptionProps<T>>;
|
|
6
|
+
export type StaticDescription = Record<string, string> | string;
|
|
7
|
+
export type Description = DescriptionFunction | StaticDescription;
|
|
7
8
|
export type GenericDescriptionProps = {
|
|
8
|
-
|
|
9
|
-
className?: string;
|
|
10
|
-
description?:
|
|
11
|
-
marginPlacement?: 'bottom' | 'top';
|
|
9
|
+
readonly Description?: MappedComponent;
|
|
10
|
+
readonly className?: string;
|
|
11
|
+
readonly description?: StaticDescription;
|
|
12
|
+
readonly marginPlacement?: 'bottom' | 'top';
|
|
12
13
|
};
|
|
13
|
-
export type FieldDescriptionProps<T extends
|
|
14
|
+
export type FieldDescriptionProps<T extends 'hidden' | FieldTypes = any> = {
|
|
14
15
|
type: T;
|
|
15
16
|
} & GenericDescriptionProps & Partial<ServerProps>;
|
|
16
17
|
//# sourceMappingURL=FieldDescription.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldDescription.d.ts","sourceRoot":"","sources":["../../../src/admin/forms/FieldDescription.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"FieldDescription.d.ts","sourceRoot":"","sources":["../../../src/admin/forms/FieldDescription.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAElD,MAAM,MAAM,mBAAmB,GAAG,aAAa,CAAA;AAE/C,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,QAAQ,GAAG,UAAU,GAAG,GAAG,IAAI,eAAe,CACvF,qBAAqB,CAAC,CAAC,CAAC,CACzB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAA;AAE/D,MAAM,MAAM,WAAW,GAAG,mBAAmB,GAAG,iBAAiB,CAAA;AACjE,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,CAAC,WAAW,CAAC,EAAE,eAAe,CAAA;IACtC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,WAAW,CAAC,EAAE,iBAAiB,CAAA;IACxC,QAAQ,CAAC,eAAe,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAA;CAC5C,CAAA;AACD,MAAM,MAAM,qBAAqB,CAAC,CAAC,SAAS,QAAQ,GAAG,UAAU,GAAG,GAAG,IAAI;IACzE,IAAI,EAAE,CAAC,CAAA;CACR,GAAG,uBAAuB,GACzB,OAAO,CAAC,WAAW,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/admin/forms/FieldDescription.ts"],"sourcesContent":["import type
|
|
1
|
+
{"version":3,"sources":["../../../src/admin/forms/FieldDescription.ts"],"sourcesContent":["import type { CustomComponent, LabelFunction, ServerProps } from '../../config/types.js'\nimport type { FieldTypes } from '../../fields/config/types.js'\nimport type { MappedComponent } from '../types.js'\n\nexport type DescriptionFunction = LabelFunction\n\nexport type DescriptionComponent<T extends 'hidden' | FieldTypes = any> = CustomComponent<\n FieldDescriptionProps<T>\n>\n\nexport type StaticDescription = Record<string, string> | string\n\nexport type Description = DescriptionFunction | StaticDescription\nexport type GenericDescriptionProps = {\n readonly Description?: MappedComponent\n readonly className?: string\n readonly description?: StaticDescription\n readonly marginPlacement?: 'bottom' | 'top'\n}\nexport type FieldDescriptionProps<T extends 'hidden' | FieldTypes = any> = {\n type: T\n} & GenericDescriptionProps &\n Partial<ServerProps>\n"],"names":[],"mappings":"AAmBA,WAGsB"}
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import type { CustomComponent } from '../../config/types.js';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
1
|
+
import type { CustomComponent, ServerProps, StaticLabel } from '../../config/types.js';
|
|
2
|
+
import type { FieldTypes } from '../../fields/config/types.js';
|
|
3
|
+
import type { MappedComponent } from '../types.js';
|
|
4
4
|
export type GenericLabelProps = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
} & {
|
|
5
|
+
readonly Label?: MappedComponent;
|
|
6
|
+
readonly as?: 'label' | 'span';
|
|
7
|
+
readonly htmlFor?: string;
|
|
8
|
+
readonly label?: StaticLabel;
|
|
9
|
+
readonly required?: boolean;
|
|
10
|
+
readonly unstyled?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type LabelProps<T extends 'hidden' | FieldTypes = any> = {
|
|
14
13
|
type: T;
|
|
15
|
-
} & GenericLabelProps
|
|
16
|
-
export type SanitizedLabelProps<T extends
|
|
17
|
-
export type LabelComponent<T extends
|
|
14
|
+
} & GenericLabelProps & Partial<ServerProps>;
|
|
15
|
+
export type SanitizedLabelProps<T extends 'hidden' | FieldTypes = any> = Omit<LabelProps<T>, 'label' | 'required'>;
|
|
16
|
+
export type LabelComponent<T extends 'hidden' | FieldTypes = any> = CustomComponent<LabelProps<T>>;
|
|
18
17
|
//# sourceMappingURL=Label.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../../src/admin/forms/Label.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../../src/admin/forms/Label.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACtF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAElD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,KAAK,CAAC,EAAE,eAAe,CAAA;IAChC,QAAQ,CAAC,EAAE,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC9B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,CAAA;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAC5B,CAAA;AAED,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,QAAQ,GAAG,UAAU,GAAG,GAAG,IAAI;IAC9D,IAAI,EAAE,CAAC,CAAA;CACR,GAAG,iBAAiB,GACnB,OAAO,CAAC,WAAW,CAAC,CAAA;AAEtB,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,QAAQ,GAAG,UAAU,GAAG,GAAG,IAAI,IAAI,CAC3E,UAAU,CAAC,CAAC,CAAC,EACb,OAAO,GAAG,UAAU,CACrB,CAAA;AAED,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,QAAQ,GAAG,UAAU,GAAG,GAAG,IAAI,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/admin/forms/Label.ts"],"sourcesContent":["import type { CustomComponent, ServerProps } from '../../config/types.js'\nimport type {
|
|
1
|
+
{"version":3,"sources":["../../../src/admin/forms/Label.ts"],"sourcesContent":["import type { CustomComponent, ServerProps, StaticLabel } from '../../config/types.js'\nimport type { FieldTypes } from '../../fields/config/types.js'\nimport type { MappedComponent } from '../types.js'\n\nexport type GenericLabelProps = {\n readonly Label?: MappedComponent\n readonly as?: 'label' | 'span'\n readonly htmlFor?: string\n readonly label?: StaticLabel\n readonly required?: boolean\n readonly unstyled?: boolean\n}\n\nexport type LabelProps<T extends 'hidden' | FieldTypes = any> = {\n type: T\n} & GenericLabelProps &\n Partial<ServerProps>\n\nexport type SanitizedLabelProps<T extends 'hidden' | FieldTypes = any> = Omit<\n LabelProps<T>,\n 'label' | 'required'\n>\n\nexport type LabelComponent<T extends 'hidden' | FieldTypes = any> = CustomComponent<LabelProps<T>>\n"],"names":[],"mappings":"AAuBA,WAAkG"}
|
package/dist/admin/types.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { PayloadComponent } from '../config/types.js';
|
|
3
|
+
import type { JsonObject } from '../types/index.js';
|
|
1
4
|
export type { LanguageOptions } from './LanguageOptions.js';
|
|
2
|
-
export type { RichTextAdapter, RichTextAdapterProvider,
|
|
5
|
+
export type { RichTextAdapter, RichTextAdapterProvider, RichTextGenerateComponentMap, RichTextHooks, } from './RichText.js';
|
|
3
6
|
export type { CellComponentProps, DefaultCellComponentProps } from './elements/Cell.js';
|
|
4
7
|
export type { ConditionalDateProps } from './elements/DatePicker.js';
|
|
5
8
|
export type { DayPickerProps, SharedProps, TimePickerProps } from './elements/DatePicker.js';
|
|
@@ -7,12 +10,11 @@ export type { CustomPreviewButton } from './elements/PreviewButton.js';
|
|
|
7
10
|
export type { CustomPublishButton } from './elements/PublishButton.js';
|
|
8
11
|
export type { CustomSaveButton } from './elements/SaveButton.js';
|
|
9
12
|
export type { CustomSaveDraftButton } from './elements/SaveDraftButton.js';
|
|
10
|
-
export type {
|
|
13
|
+
export type { DocumentTabComponent, DocumentTabCondition, DocumentTabConfig, DocumentTabProps, } from './elements/Tab.js';
|
|
11
14
|
export type { CustomUpload } from './elements/Upload.js';
|
|
12
15
|
export type { WithServerSidePropsComponent, WithServerSidePropsComponentProps, } from './elements/WithServerSideProps.js';
|
|
13
16
|
export type { ArrayFieldDescriptionComponent, ArrayFieldErrorComponent, ArrayFieldLabelComponent, ArrayFieldProps, } from './fields/Array.js';
|
|
14
|
-
export type {
|
|
15
|
-
export type { BlocksFieldDescriptionComponent, BlocksFieldErrorComponent, BlocksFieldLabelComponent, BlocksFieldProps, } from './fields/Blocks.js';
|
|
17
|
+
export type { BlockFieldDescriptionComponent, BlockFieldErrorComponent, BlockFieldLabelComponent, BlockFieldProps, } from './fields/Blocks.js';
|
|
16
18
|
export type { CheckboxFieldDescriptionComponent, CheckboxFieldErrorComponent, CheckboxFieldLabelComponent, CheckboxFieldProps, } from './fields/Checkbox.js';
|
|
17
19
|
export type { CodeFieldDescriptionComponent, CodeFieldErrorComponent, CodeFieldLabelComponent, CodeFieldProps, } from './fields/Code.js';
|
|
18
20
|
export type { CollapsibleFieldDescriptionComponent, CollapsibleFieldErrorComponent, CollapsibleFieldLabelComponent, CollapsibleFieldProps, } from './fields/Collapsible.js';
|
|
@@ -25,22 +27,39 @@ export type { NumberFieldDescriptionComponent, NumberFieldErrorComponent, Number
|
|
|
25
27
|
export type { PointFieldDescriptionComponent, PointFieldErrorComponent, PointFieldLabelComponent, PointFieldProps, } from './fields/Point.js';
|
|
26
28
|
export type { RadioFieldDescriptionComponent, RadioFieldErrorComponent, RadioFieldLabelComponent, RadioFieldProps, } from './fields/Radio.js';
|
|
27
29
|
export type { RelationshipFieldDescriptionComponent, RelationshipFieldErrorComponent, RelationshipFieldLabelComponent, RelationshipFieldProps, } from './fields/Relationship.js';
|
|
28
|
-
export type {
|
|
30
|
+
export type { RichTextFieldDescriptionComponent, RichTextFieldErrorComponent, RichTextFieldLabelComponent, RichTextFieldProps, } from './fields/RichText.js';
|
|
29
31
|
export type { RowFieldDescriptionComponent, RowFieldErrorComponent, RowFieldLabelComponent, RowFieldProps, } from './fields/Row.js';
|
|
30
32
|
export type { SelectFieldDescriptionComponent, SelectFieldErrorComponent, SelectFieldLabelComponent, SelectFieldProps, } from './fields/Select.js';
|
|
31
|
-
export type {
|
|
32
|
-
export type { TabsFieldDescriptionComponent, TabsFieldErrorComponent, TabsFieldLabelComponent, TabsFieldProps, } from './fields/Tabs.js';
|
|
33
|
+
export type { ClientTab, TabsFieldDescriptionComponent, TabsFieldErrorComponent, TabsFieldLabelComponent, TabsFieldProps, } from './fields/Tabs.js';
|
|
33
34
|
export type { TextFieldDescriptionComponent, TextFieldErrorComponent, TextFieldLabelComponent, TextFieldProps, } from './fields/Text.js';
|
|
34
35
|
export type { TextareaFieldDescriptionComponent, TextareaFieldErrorComponent, TextareaFieldLabelComponent, TextareaFieldProps, } from './fields/Textarea.js';
|
|
35
36
|
export type { UploadFieldDescriptionComponent, UploadFieldErrorComponent, UploadFieldLabelComponent, UploadFieldProps, } from './fields/Upload.js';
|
|
36
|
-
export type { FieldComponentProps } from './fields/index.js';
|
|
37
37
|
export type { ErrorComponent, ErrorProps, GenericErrorProps } from './forms/Error.js';
|
|
38
38
|
export type { FormFieldBase } from './forms/Field.js';
|
|
39
|
-
export type { Description, DescriptionComponent, DescriptionFunction, FieldDescriptionProps, GenericDescriptionProps, } from './forms/FieldDescription.js';
|
|
40
|
-
export type { MappedField } from './forms/FieldMap.js';
|
|
41
|
-
export type { FieldMap } from './forms/FieldMap.js';
|
|
39
|
+
export type { Description, DescriptionComponent, DescriptionFunction, FieldDescriptionProps, GenericDescriptionProps, StaticDescription, } from './forms/FieldDescription.js';
|
|
42
40
|
export type { Data, FilterOptionsResult, FormField, FormState, Row } from './forms/Form.js';
|
|
43
41
|
export type { GenericLabelProps, LabelComponent, LabelProps, SanitizedLabelProps, } from './forms/Label.js';
|
|
44
42
|
export type { RowLabel, RowLabelComponent } from './forms/RowLabel.js';
|
|
45
43
|
export type { AdminViewComponent, AdminViewProps, EditViewProps, InitPageResult, ServerSideEditViewProps, VisibleEntities, } from './views/types.js';
|
|
44
|
+
export type MappedServerComponent<TComponentClientProps extends JsonObject = JsonObject> = {
|
|
45
|
+
Component: React.ComponentType<TComponentClientProps>;
|
|
46
|
+
RenderedComponent: React.ReactNode;
|
|
47
|
+
props?: Partial<any>;
|
|
48
|
+
type: 'server';
|
|
49
|
+
};
|
|
50
|
+
export type MappedClientComponent<TComponentClientProps extends JsonObject = JsonObject> = {
|
|
51
|
+
Component: React.ComponentType<TComponentClientProps>;
|
|
52
|
+
RenderedComponent?: React.ReactNode;
|
|
53
|
+
props?: Partial<TComponentClientProps>;
|
|
54
|
+
type: 'client';
|
|
55
|
+
};
|
|
56
|
+
export type MappedComponent<TComponentClientProps extends JsonObject = JsonObject> = MappedClientComponent<TComponentClientProps> | MappedServerComponent<TComponentClientProps> | undefined;
|
|
57
|
+
export type CreateMappedComponent = {
|
|
58
|
+
<T extends JsonObject>(component: {
|
|
59
|
+
Component: React.FC<T>;
|
|
60
|
+
} | PayloadComponent<T> | null, props: object, fallback: React.FC, identifier: string): MappedComponent<T>;
|
|
61
|
+
<T extends JsonObject>(components: ({
|
|
62
|
+
Component: React.FC<T>;
|
|
63
|
+
} | PayloadComponent<T>)[], props: object, fallback: React.FC, identifier: string): MappedComponent<T>[];
|
|
64
|
+
};
|
|
46
65
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/admin/types.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,YAAY,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/admin/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAEnD,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,YAAY,EACV,eAAe,EACf,uBAAuB,EACvB,4BAA4B,EAC5B,aAAa,GACd,MAAM,eAAe,CAAA;AACtB,YAAY,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAA;AACvF,YAAY,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AACpE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,eAAe,EAAE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UAAU,GAAG,UAAU,IAC7E,qBAAqB,CAAC,qBAAqB,CAAC,GAC5C,qBAAqB,CAAC,qBAAqB,CAAC,GAC5C,SAAS,CAAA;AAEb,MAAM,MAAM,qBAAqB,GAAG;IAClC,CAAC,CAAC,SAAS,UAAU,EACnB,SAAS,EAAE;QAAE,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG,gBAAgB,CAAC,CAAC,CAAC,GAAG,IAAI,EAClE,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,KAAK,CAAC,EAAE,EAClB,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,CAAC,CAAC,CAAA;IAErB,CAAC,CAAC,SAAS,UAAU,EACnB,UAAU,EAAE,CAAC;QAAE,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAAE,EAChE,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,KAAK,CAAC,EAAE,EAClB,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,CAAC,CAAC,EAAE,CAAA;CACxB,CAAA"}
|
package/dist/admin/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/admin/types.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../src/admin/types.ts"],"sourcesContent":["import type React from 'react'\n\nimport type { PayloadComponent } from '../config/types.js'\nimport type { JsonObject } from '../types/index.js'\n\nexport type { LanguageOptions } from './LanguageOptions.js'\nexport type {\n RichTextAdapter,\n RichTextAdapterProvider,\n RichTextGenerateComponentMap,\n RichTextHooks,\n} from './RichText.js'\nexport type { CellComponentProps, DefaultCellComponentProps } from './elements/Cell.js'\nexport type { ConditionalDateProps } from './elements/DatePicker.js'\nexport type { DayPickerProps, SharedProps, TimePickerProps } from './elements/DatePicker.js'\nexport type { CustomPreviewButton } from './elements/PreviewButton.js'\nexport type { CustomPublishButton } from './elements/PublishButton.js'\nexport type { CustomSaveButton } from './elements/SaveButton.js'\nexport type { CustomSaveDraftButton } from './elements/SaveDraftButton.js'\n\nexport type {\n DocumentTabComponent,\n DocumentTabCondition,\n DocumentTabConfig,\n DocumentTabProps,\n} from './elements/Tab.js'\n\nexport type { CustomUpload } from './elements/Upload.js'\n\nexport type {\n WithServerSidePropsComponent,\n WithServerSidePropsComponentProps,\n} from './elements/WithServerSideProps.js'\n\nexport type {\n ArrayFieldDescriptionComponent,\n ArrayFieldErrorComponent,\n ArrayFieldLabelComponent,\n ArrayFieldProps,\n} from './fields/Array.js'\n\nexport type {\n BlockFieldDescriptionComponent,\n BlockFieldErrorComponent,\n BlockFieldLabelComponent,\n BlockFieldProps,\n} from './fields/Blocks.js'\n\nexport type {\n CheckboxFieldDescriptionComponent,\n CheckboxFieldErrorComponent,\n CheckboxFieldLabelComponent,\n CheckboxFieldProps,\n} from './fields/Checkbox.js'\n\nexport type {\n CodeFieldDescriptionComponent,\n CodeFieldErrorComponent,\n CodeFieldLabelComponent,\n CodeFieldProps,\n} from './fields/Code.js'\n\nexport type {\n CollapsibleFieldDescriptionComponent,\n CollapsibleFieldErrorComponent,\n CollapsibleFieldLabelComponent,\n CollapsibleFieldProps,\n} from './fields/Collapsible.js'\n\nexport type {\n DateFieldDescriptionComponent,\n DateFieldErrorComponent,\n DateFieldLabelComponent,\n DateFieldProps,\n} from './fields/Date.js'\n\nexport type {\n EmailFieldDescriptionComponent,\n EmailFieldErrorComponent,\n EmailFieldLabelComponent,\n EmailFieldProps,\n} from './fields/Email.js'\n\nexport type {\n GroupFieldDescriptionComponent,\n GroupFieldErrorComponent,\n GroupFieldLabelComponent,\n GroupFieldProps,\n} from './fields/Group.js'\n\nexport type {\n HiddenFieldDescriptionComponent,\n HiddenFieldErrorComponent,\n HiddenFieldLabelComponent,\n HiddenFieldProps,\n} from './fields/Hidden.js'\n\nexport type {\n JSONFieldDescriptionComponent,\n JSONFieldErrorComponent,\n JSONFieldLabelComponent,\n JSONFieldProps,\n} from './fields/JSON.js'\n\nexport type {\n NumberFieldDescriptionComponent,\n NumberFieldErrorComponent,\n NumberFieldLabelComponent,\n NumberFieldProps,\n} from './fields/Number.js'\n\nexport type {\n PointFieldDescriptionComponent,\n PointFieldErrorComponent,\n PointFieldLabelComponent,\n PointFieldProps,\n} from './fields/Point.js'\n\nexport type {\n RadioFieldDescriptionComponent,\n RadioFieldErrorComponent,\n RadioFieldLabelComponent,\n RadioFieldProps,\n} from './fields/Radio.js'\n\nexport type {\n RelationshipFieldDescriptionComponent,\n RelationshipFieldErrorComponent,\n RelationshipFieldLabelComponent,\n RelationshipFieldProps,\n} from './fields/Relationship.js'\n\nexport type {\n RichTextFieldDescriptionComponent,\n RichTextFieldErrorComponent,\n RichTextFieldLabelComponent,\n RichTextFieldProps,\n} from './fields/RichText.js'\n\nexport type {\n RowFieldDescriptionComponent,\n RowFieldErrorComponent,\n RowFieldLabelComponent,\n RowFieldProps,\n} from './fields/Row.js'\n\nexport type {\n SelectFieldDescriptionComponent,\n SelectFieldErrorComponent,\n SelectFieldLabelComponent,\n SelectFieldProps,\n} from './fields/Select.js'\n\nexport type {\n ClientTab,\n TabsFieldDescriptionComponent,\n TabsFieldErrorComponent,\n TabsFieldLabelComponent,\n TabsFieldProps,\n} from './fields/Tabs.js'\n\nexport type {\n TextFieldDescriptionComponent,\n TextFieldErrorComponent,\n TextFieldLabelComponent,\n TextFieldProps,\n} from './fields/Text.js'\n\nexport type {\n TextareaFieldDescriptionComponent,\n TextareaFieldErrorComponent,\n TextareaFieldLabelComponent,\n TextareaFieldProps,\n} from './fields/Textarea.js'\n\nexport type {\n UploadFieldDescriptionComponent,\n UploadFieldErrorComponent,\n UploadFieldLabelComponent,\n UploadFieldProps,\n} from './fields/Upload.js'\n\nexport type { ErrorComponent, ErrorProps, GenericErrorProps } from './forms/Error.js'\n\nexport type { FormFieldBase } from './forms/Field.js'\n\nexport type {\n Description,\n DescriptionComponent,\n DescriptionFunction,\n FieldDescriptionProps,\n GenericDescriptionProps,\n StaticDescription,\n} from './forms/FieldDescription.js'\n\nexport type { Data, FilterOptionsResult, FormField, FormState, Row } from './forms/Form.js'\n\nexport type {\n GenericLabelProps,\n LabelComponent,\n LabelProps,\n SanitizedLabelProps,\n} from './forms/Label.js'\n\nexport type { RowLabel, RowLabelComponent } from './forms/RowLabel.js'\n\nexport type {\n AdminViewComponent,\n AdminViewProps,\n EditViewProps,\n InitPageResult,\n ServerSideEditViewProps,\n VisibleEntities,\n} from './views/types.js'\n\nexport type MappedServerComponent<TComponentClientProps extends JsonObject = JsonObject> = {\n Component: React.ComponentType<TComponentClientProps>\n RenderedComponent: React.ReactNode\n props?: Partial<any>\n type: 'server'\n}\n\nexport type MappedClientComponent<TComponentClientProps extends JsonObject = JsonObject> = {\n Component: React.ComponentType<TComponentClientProps>\n RenderedComponent?: React.ReactNode\n props?: Partial<TComponentClientProps>\n type: 'client'\n}\n\nexport type MappedComponent<TComponentClientProps extends JsonObject = JsonObject> =\n | MappedClientComponent<TComponentClientProps>\n | MappedServerComponent<TComponentClientProps>\n | undefined\n\nexport type CreateMappedComponent = {\n <T extends JsonObject>(\n component: { Component: React.FC<T> } | PayloadComponent<T> | null,\n props: object,\n fallback: React.FC,\n identifier: string,\n ): MappedComponent<T>\n\n <T extends JsonObject>(\n components: ({ Component: React.FC<T> } | PayloadComponent<T>)[],\n props: object,\n fallback: React.FC,\n identifier: string,\n ): MappedComponent<T>[]\n}\n"],"names":[],"mappings":"AA0OA,WAcC"}
|
|
@@ -1,32 +1,40 @@
|
|
|
1
1
|
import type { ClientTranslationsObject } from '@payloadcms/translations';
|
|
2
2
|
import type { Permissions } from '../../auth/index.js';
|
|
3
|
+
import type { ImportMap } from '../../bin/generateImportMap/index.js';
|
|
3
4
|
import type { SanitizedCollectionConfig } from '../../collections/config/types.js';
|
|
4
|
-
import type {
|
|
5
|
+
import type { ClientConfig } from '../../config/client.js';
|
|
6
|
+
import type { Locale, PayloadComponent } from '../../config/types.js';
|
|
5
7
|
import type { SanitizedGlobalConfig } from '../../globals/config/types.js';
|
|
6
8
|
import type { PayloadRequest } from '../../types/index.js';
|
|
7
9
|
import type { LanguageOptions } from '../LanguageOptions.js';
|
|
10
|
+
import type { MappedComponent } from '../types.js';
|
|
8
11
|
export type AdminViewConfig = {
|
|
9
12
|
Component: AdminViewComponent;
|
|
10
13
|
/** Whether the path should be matched exactly or as a prefix */
|
|
11
14
|
exact?: boolean;
|
|
12
|
-
path
|
|
15
|
+
path?: string;
|
|
13
16
|
sensitive?: boolean;
|
|
14
17
|
strict?: boolean;
|
|
15
18
|
};
|
|
19
|
+
export type MappedView = {
|
|
20
|
+
Component: MappedComponent;
|
|
21
|
+
actions?: MappedComponent[];
|
|
22
|
+
};
|
|
16
23
|
export type AdminViewProps = {
|
|
17
|
-
|
|
18
|
-
|
|
24
|
+
readonly clientConfig: ClientConfig;
|
|
25
|
+
readonly importMap: ImportMap;
|
|
26
|
+
readonly initPageResult: InitPageResult;
|
|
27
|
+
readonly params?: {
|
|
19
28
|
[key: string]: string | string[] | undefined;
|
|
20
29
|
};
|
|
21
|
-
searchParams: {
|
|
30
|
+
readonly searchParams: {
|
|
22
31
|
[key: string]: string | string[] | undefined;
|
|
23
32
|
};
|
|
24
33
|
};
|
|
25
|
-
export type AdminViewComponent =
|
|
26
|
-
export type AdminView = AdminViewComponent | AdminViewConfig;
|
|
34
|
+
export type AdminViewComponent = PayloadComponent<AdminViewProps>;
|
|
27
35
|
export type EditViewProps = {
|
|
28
|
-
collectionSlug?: string;
|
|
29
|
-
globalSlug?: string;
|
|
36
|
+
readonly collectionSlug?: string;
|
|
37
|
+
readonly globalSlug?: string;
|
|
30
38
|
};
|
|
31
39
|
export type VisibleEntities = {
|
|
32
40
|
collections: SanitizedCollectionConfig['slug'][];
|
|
@@ -45,12 +53,12 @@ export type InitPageResult = {
|
|
|
45
53
|
visibleEntities: VisibleEntities;
|
|
46
54
|
};
|
|
47
55
|
export type ServerSideEditViewProps = {
|
|
48
|
-
initPageResult: InitPageResult;
|
|
49
|
-
params: {
|
|
56
|
+
readonly initPageResult: InitPageResult;
|
|
57
|
+
readonly params: {
|
|
50
58
|
[key: string]: string | string[] | undefined;
|
|
51
59
|
};
|
|
52
|
-
routeSegments: string[];
|
|
53
|
-
searchParams: {
|
|
60
|
+
readonly routeSegments: string[];
|
|
61
|
+
readonly searchParams: {
|
|
54
62
|
[key: string]: string | string[] | undefined;
|
|
55
63
|
};
|
|
56
64
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/admin/views/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAA;AAExE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAA;AAClF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/admin/views/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAA;AAExE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AACrE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAA;AAClF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AAC1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EA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AAM,MAAM,cAAc,GAAG;IAC3B,gBAAgB,CAAC,EAAE,yBAAyB,CAAA;IAC5C,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,qBAAqB,CAAA;IACpC,eAAe,EAAE,eAAe,CAAA;IAChC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,WAAW,CAAA;IACxB,GAAG,EAAE,cAAc,CAAA;IACnB,YAAY,EAAE,wBAAwB,CAAA;IACtC,eAAe,EAAE,eAAe,CAAA;CACjC,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAA;IACvC,QAAQ,CAAC,MAAM,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAA;KAAE,CAAA;IACjE,QAAQ,CAAC,aAAa,EAAE,MAAM,EAAE,CAAA;IAChC,QAAQ,CAAC,YAAY,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAA;KAAE,CAAA;CACxE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/admin/views/types.ts"],"sourcesContent":["import type { ClientTranslationsObject } from '@payloadcms/translations'\n\nimport type { Permissions } from '../../auth/index.js'\nimport type { SanitizedCollectionConfig } from '../../collections/config/types.js'\nimport type { Locale } from '../../config/types.js'\nimport type { SanitizedGlobalConfig } from '../../globals/config/types.js'\nimport type { PayloadRequest } from '../../types/index.js'\nimport type { LanguageOptions } from '../LanguageOptions.js'\n\nexport type AdminViewConfig = {\n Component: AdminViewComponent\n /** Whether the path should be matched exactly or as a prefix */\n exact?: boolean\n path
|
|
1
|
+
{"version":3,"sources":["../../../src/admin/views/types.ts"],"sourcesContent":["import type { ClientTranslationsObject } from '@payloadcms/translations'\n\nimport type { Permissions } from '../../auth/index.js'\nimport type { ImportMap } from '../../bin/generateImportMap/index.js'\nimport type { SanitizedCollectionConfig } from '../../collections/config/types.js'\nimport type { ClientConfig } from '../../config/client.js'\nimport type { Locale, PayloadComponent } from '../../config/types.js'\nimport type { SanitizedGlobalConfig } from '../../globals/config/types.js'\nimport type { PayloadRequest } from '../../types/index.js'\nimport type { LanguageOptions } from '../LanguageOptions.js'\nimport type { MappedComponent } from '../types.js'\n\nexport type AdminViewConfig = {\n Component: AdminViewComponent\n /** Whether the path should be matched exactly or as a prefix */\n exact?: boolean\n path?: string\n sensitive?: boolean\n strict?: boolean\n}\n\nexport type MappedView = {\n Component: MappedComponent\n actions?: MappedComponent[]\n}\n\nexport type AdminViewProps = {\n readonly clientConfig: ClientConfig\n readonly importMap: ImportMap\n readonly initPageResult: InitPageResult\n readonly params?: { [key: string]: string | string[] | undefined }\n readonly searchParams: { [key: string]: string | string[] | undefined }\n}\n\nexport type AdminViewComponent = PayloadComponent<AdminViewProps>\n\nexport type EditViewProps = {\n readonly collectionSlug?: string\n readonly globalSlug?: string\n}\n\nexport type VisibleEntities = {\n collections: SanitizedCollectionConfig['slug'][]\n globals: SanitizedGlobalConfig['slug'][]\n}\n\nexport type InitPageResult = {\n collectionConfig?: SanitizedCollectionConfig\n cookies: Map<string, string>\n docID?: string\n globalConfig?: SanitizedGlobalConfig\n languageOptions: LanguageOptions\n locale?: Locale\n permissions: Permissions\n req: PayloadRequest\n translations: ClientTranslationsObject\n visibleEntities: VisibleEntities\n}\n\nexport type ServerSideEditViewProps = {\n readonly initPageResult: InitPageResult\n readonly params: { [key: string]: string | string[] | undefined }\n readonly routeSegments: string[]\n readonly searchParams: { [key: string]: string | string[] | undefined }\n}\n"],"names":[],"mappings":"AA2DA,WAKC"}
|
|
@@ -7,7 +7,7 @@ export const apiKeyFields = [
|
|
|
7
7
|
type: 'checkbox',
|
|
8
8
|
admin: {
|
|
9
9
|
components: {
|
|
10
|
-
Field:
|
|
10
|
+
Field: '@payloadcms/ui/shared#emptyComponent'
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
label: ({ t })=>t('authentication:enableAPIKey')
|
|
@@ -17,7 +17,7 @@ export const apiKeyFields = [
|
|
|
17
17
|
type: 'text',
|
|
18
18
|
admin: {
|
|
19
19
|
components: {
|
|
20
|
-
Field:
|
|
20
|
+
Field: '@payloadcms/ui/shared#emptyComponent'
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
hooks: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/auth/baseFields/apiKey.ts"],"sourcesContent":["import crypto from 'crypto'\n\nimport type { Field, FieldHook } from '../../fields/config/types.js'\n\nconst encryptKey: FieldHook = ({ req, value }) =>\n value ? req.payload.encrypt(value as string) : null\nconst decryptKey: FieldHook = ({ req, value }) =>\n value ? req.payload.decrypt(value as string) : undefined\n\nexport const apiKeyFields = [\n {\n name: 'enableAPIKey',\n type: 'checkbox',\n admin: {\n components: {\n Field:
|
|
1
|
+
{"version":3,"sources":["../../../src/auth/baseFields/apiKey.ts"],"sourcesContent":["import crypto from 'crypto'\n\nimport type { Field, FieldHook } from '../../fields/config/types.js'\n\nconst encryptKey: FieldHook = ({ req, value }) =>\n value ? req.payload.encrypt(value as string) : null\nconst decryptKey: FieldHook = ({ req, value }) =>\n value ? req.payload.decrypt(value as string) : undefined\n\nexport const apiKeyFields = [\n {\n name: 'enableAPIKey',\n type: 'checkbox',\n admin: {\n components: {\n Field: '@payloadcms/ui/shared#emptyComponent',\n },\n },\n label: ({ t }) => t('authentication:enableAPIKey'),\n },\n {\n name: 'apiKey',\n type: 'text',\n admin: {\n components: {\n Field: '@payloadcms/ui/shared#emptyComponent',\n },\n },\n hooks: {\n afterRead: [decryptKey],\n beforeChange: [encryptKey],\n },\n label: ({ t }) => t('authentication:apiKey'),\n },\n {\n name: 'apiKeyIndex',\n type: 'text',\n admin: {\n disabled: true,\n },\n hidden: true,\n hooks: {\n beforeValidate: [\n ({ data, req, value }) => {\n if (data.apiKey === false || data.apiKey === null) {\n return null\n }\n if (data.enableAPIKey === false || data.enableAPIKey === null) {\n return null\n }\n if (data.apiKey) {\n return crypto\n .createHmac('sha1', req.payload.secret)\n .update(data.apiKey as string)\n .digest('hex')\n }\n return value\n },\n ],\n },\n },\n] as Field[]\n"],"names":["crypto","encryptKey","req","value","payload","encrypt","decryptKey","decrypt","undefined","apiKeyFields","name","type","admin","components","Field","label","t","hooks","afterRead","beforeChange","disabled","hidden","beforeValidate","data","apiKey","enableAPIKey","createHmac","secret","update","digest"],"mappings":"AAAA,OAAOA,YAAY,SAAQ;AAI3B,MAAMC,aAAwB,CAAC,EAAEC,GAAG,EAAEC,KAAK,EAAE,GAC3CA,QAAQD,IAAIE,OAAO,CAACC,OAAO,CAACF,SAAmB;AACjD,MAAMG,aAAwB,CAAC,EAAEJ,GAAG,EAAEC,KAAK,EAAE,GAC3CA,QAAQD,IAAIE,OAAO,CAACG,OAAO,CAACJ,SAAmBK;AAEjD,OAAO,MAAMC,eAAe;IAC1B;QACEC,MAAM;QACNC,MAAM;QACNC,OAAO;YACLC,YAAY;gBACVC,OAAO;YACT;QACF;QACAC,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;IACtB;IACA;QACEN,MAAM;QACNC,MAAM;QACNC,OAAO;YACLC,YAAY;gBACVC,OAAO;YACT;QACF;QACAG,OAAO;YACLC,WAAW;gBAACZ;aAAW;YACvBa,cAAc;gBAAClB;aAAW;QAC5B;QACAc,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;IACtB;IACA;QACEN,MAAM;QACNC,MAAM;QACNC,OAAO;YACLQ,UAAU;QACZ;QACAC,QAAQ;QACRJ,OAAO;YACLK,gBAAgB;gBACd,CAAC,EAAEC,IAAI,EAAErB,GAAG,EAAEC,KAAK,EAAE;oBACnB,IAAIoB,KAAKC,MAAM,KAAK,SAASD,KAAKC,MAAM,KAAK,MAAM;wBACjD,OAAO;oBACT;oBACA,IAAID,KAAKE,YAAY,KAAK,SAASF,KAAKE,YAAY,KAAK,MAAM;wBAC7D,OAAO;oBACT;oBACA,IAAIF,KAAKC,MAAM,EAAE;wBACf,OAAOxB,OACJ0B,UAAU,CAAC,QAAQxB,IAAIE,OAAO,CAACuB,MAAM,EACrCC,MAAM,CAACL,KAAKC,MAAM,EAClBK,MAAM,CAAC;oBACZ;oBACA,OAAO1B;gBACT;aACD;QACH;IACF;CACD,CAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/auth/baseFields/email.ts"],"sourcesContent":["import type { EmailField } from '../../fields/config/types.js'\n\nimport { email } from '../../fields/validations.js'\n\nexport const emailFieldConfig: EmailField = {\n name: 'email',\n type: 'email',\n admin: {\n components: {\n Field:
|
|
1
|
+
{"version":3,"sources":["../../../src/auth/baseFields/email.ts"],"sourcesContent":["import type { EmailField } from '../../fields/config/types.js'\n\nimport { email } from '../../fields/validations.js'\n\nexport const emailFieldConfig: EmailField = {\n name: 'email',\n type: 'email',\n admin: {\n components: {\n Field: '@payloadcms/ui/shared#emptyComponent',\n },\n },\n hooks: {\n beforeChange: [\n ({ value }) => {\n if (value) {\n return value.toLowerCase().trim()\n }\n },\n ],\n },\n label: ({ t }) => t('general:email'),\n required: true,\n unique: true,\n validate: email,\n}\n"],"names":["email","emailFieldConfig","name","type","admin","components","Field","hooks","beforeChange","value","toLowerCase","trim","label","t","required","unique","validate"],"mappings":"AAEA,SAASA,KAAK,QAAQ,8BAA6B;AAEnD,OAAO,MAAMC,mBAA+B;IAC1CC,MAAM;IACNC,MAAM;IACNC,OAAO;QACLC,YAAY;YACVC,OAAO;QACT;IACF;IACAC,OAAO;QACLC,cAAc;YACZ,CAAC,EAAEC,KAAK,EAAE;gBACR,IAAIA,OAAO;oBACT,OAAOA,MAAMC,WAAW,GAAGC,IAAI;gBACjC;YACF;SACD;IACH;IACAC,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;IACpBC,UAAU;IACVC,QAAQ;IACRC,UAAUhB;AACZ,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/auth/baseFields/username.ts"],"sourcesContent":["import type { TextField } from '../../fields/config/types.js'\n\nimport { username } from '../../fields/validations.js'\n\nexport const usernameFieldConfig: TextField = {\n name: 'username',\n type: 'text',\n admin: {\n components: {\n Field:
|
|
1
|
+
{"version":3,"sources":["../../../src/auth/baseFields/username.ts"],"sourcesContent":["import type { TextField } from '../../fields/config/types.js'\n\nimport { username } from '../../fields/validations.js'\n\nexport const usernameFieldConfig: TextField = {\n name: 'username',\n type: 'text',\n admin: {\n components: {\n Field: '@payloadcms/ui/shared#emptyComponent',\n },\n },\n hooks: {\n beforeChange: [\n ({ value }) => {\n if (value) {\n return value.toLowerCase().trim()\n }\n },\n ],\n },\n label: ({ t }) => t('authentication:username'),\n required: true,\n unique: true,\n validate: username,\n}\n"],"names":["username","usernameFieldConfig","name","type","admin","components","Field","hooks","beforeChange","value","toLowerCase","trim","label","t","required","unique","validate"],"mappings":"AAEA,SAASA,QAAQ,QAAQ,8BAA6B;AAEtD,OAAO,MAAMC,sBAAiC;IAC5CC,MAAM;IACNC,MAAM;IACNC,OAAO;QACLC,YAAY;YACVC,OAAO;QACT;IACF;IACAC,OAAO;QACLC,cAAc;YACZ,CAAC,EAAEC,KAAK,EAAE;gBACR,IAAIA,OAAO;oBACT,OAAOA,MAAMC,WAAW,GAAGC,IAAI;gBACjC;YACF;SACD;IACH;IACAC,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;IACpBC,UAAU;IACVC,QAAQ;IACRC,UAAUhB;AACZ,EAAC"}
|