payload 4.0.0-canary.3 → 4.0.0-canary.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin.js +11 -0
- package/dist/admin/types.d.ts +1 -0
- package/dist/admin/types.d.ts.map +1 -1
- package/dist/admin/types.js.map +1 -1
- package/dist/bin/generateImportMap/iterateCollections.d.ts.map +1 -1
- package/dist/bin/generateImportMap/iterateCollections.js +10 -0
- package/dist/bin/generateImportMap/iterateCollections.js.map +1 -1
- package/dist/collections/config/client.d.ts +1 -1
- package/dist/collections/config/client.d.ts.map +1 -1
- package/dist/collections/config/client.js +1 -0
- package/dist/collections/config/client.js.map +1 -1
- package/dist/exports/shared.d.ts +1 -0
- package/dist/exports/shared.d.ts.map +1 -1
- package/dist/exports/shared.js +1 -0
- package/dist/exports/shared.js.map +1 -1
- package/dist/index.bundled.d.ts +32 -3
- package/dist/query-presets/config.d.ts.map +1 -1
- package/dist/query-presets/config.js +73 -34
- package/dist/query-presets/config.js.map +1 -1
- package/dist/query-presets/constraints.d.ts.map +1 -1
- package/dist/query-presets/constraints.js +2 -1
- package/dist/query-presets/constraints.js.map +1 -1
- package/dist/uploads/matchMimeType.d.ts +8 -0
- package/dist/uploads/matchMimeType.d.ts.map +1 -0
- package/dist/uploads/matchMimeType.js +19 -0
- package/dist/uploads/matchMimeType.js.map +1 -0
- package/dist/uploads/matchMimeType.spec.js +66 -0
- package/dist/uploads/matchMimeType.spec.js.map +1 -0
- package/dist/uploads/types.d.ts +21 -0
- package/dist/uploads/types.d.ts.map +1 -1
- package/dist/uploads/types.js.map +1 -1
- package/dist/utilities/createPayloadRequest.d.ts.map +1 -1
- package/dist/utilities/createPayloadRequest.js +1 -0
- package/dist/utilities/createPayloadRequest.js.map +1 -1
- package/package.json +3 -3
package/bin.js
CHANGED
|
@@ -23,6 +23,17 @@ if (disableTranspile) {
|
|
|
23
23
|
|
|
24
24
|
if (!useSwc) {
|
|
25
25
|
const start = async () => {
|
|
26
|
+
// tsx 4.22.4 uses Node's synchronous `module.registerHooks` API when it is available
|
|
27
|
+
// (Node v23.5+). On those versions that code path leaks tsx's internal `?namespace=...`
|
|
28
|
+
// query string onto resolved specifiers — including Node built-ins like `node:crypto` —
|
|
29
|
+
// which Node then tries to open as a file, failing with ENOENT. Removing `registerHooks`
|
|
30
|
+
// forces tsx to fall back to its older async `module.register()` worker path, which does
|
|
31
|
+
// not have this bug. See https://github.com/payloadcms/payload/issues/16949
|
|
32
|
+
const nodeModule = await import('node:module')
|
|
33
|
+
if (typeof nodeModule.default.registerHooks === 'function') {
|
|
34
|
+
nodeModule.default.registerHooks = undefined
|
|
35
|
+
}
|
|
36
|
+
|
|
26
37
|
// Use tsx
|
|
27
38
|
let tsImport = (await import('tsx/esm/api')).tsImport
|
|
28
39
|
|
package/dist/admin/types.d.ts
CHANGED
|
@@ -151,6 +151,7 @@ export type DocumentSlots = {
|
|
|
151
151
|
UnpublishButton?: React.ReactNode;
|
|
152
152
|
Upload?: React.ReactNode;
|
|
153
153
|
UploadControls?: React.ReactNode;
|
|
154
|
+
UploadFilePreview?: React.ReactNode;
|
|
154
155
|
};
|
|
155
156
|
export type { BuildTableStateArgs, DefaultServerFunctionArgs, InitReqResult, ListQuery, ServerFunction, ServerFunctionArgs, ServerFunctionClient, ServerFunctionClientArgs, ServerFunctionConfig, ServerFunctionHandler, SlugifyServerFunctionArgs, } from './functions/index.js';
|
|
156
157
|
export type { LanguageOptions } from './LanguageOptions.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/admin/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAC7E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAA;AAClE,OAAO,KAAK,EAAE,UAAU,EAA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H,oBAAoB,IAAI,cAAc,EACtC,oBAAoB,EACpB,wBAAwB,EACxB,cAAc,EACd,mBAAmB,EACnB,0BAA0B,EAC1B,0BAA0B,EAC1B,8BAA8B,EAC9B,SAAS,EACT,eAAe,GAChB,MAAM,kBAAkB,CAAA;AAEzB,YAAY,EACV,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EACzB,6BAA6B,EAC7B,qBAAqB,EACrB,qBAAqB,EACrB,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAC1B,8BAA8B,EAC9B,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,aAAa,EACb,6BAA6B,EAC7B,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,iBAAiB,CAAA;AAExB,KAAK,UAAU,GAAG,EAAE,GAAG,MAAM,CAAA;AAC7B,MAAM,MAAM,cAAc,GAAG,GAAG,CAC9B,UAAU,EACR;IACE,MAAM,EAAE,KAAK,EAAE,CAAA;CAChB,GACD,KAAK,GACL,KAAK,GACL,GAAG,CACN,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG,GAAG,CACpC,UAAU,EACR;IACE,MAAM,EAAE,WAAW,EAAE,CAAA;CACtB,GACD,WAAW,GACX,WAAW,GACX,SAAS,CACZ,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,CAAC,EAAE,UAAU,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;IAClB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACpB,SAAS,EAAE,QAAQ,GAAG,QAAQ,CAAA;IAC9B,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA"}
|
package/dist/admin/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/admin/types.ts"],"sourcesContent":["import type { AcceptedLanguages, I18nClient } from '@payloadcms/translations'\nimport type React from 'react'\n\nimport type { ImportMap } from '../bin/generateImportMap/index.js'\nimport type { TypeWithID } from '../collections/config/types.js'\nimport type { SanitizedConfig } from '../config/types.js'\nimport type {\n Block,\n ClientBlock,\n ClientField,\n Field,\n FieldTypes,\n Tab,\n} from '../fields/config/types.js'\nimport type { JsonObject } from '../types/index.js'\nimport type { ClientTab } from './fields/Tabs.js'\nimport type {\n BuildFormStateArgs,\n Data,\n FieldState,\n FieldStateWithoutComponents,\n FilterOptionsResult,\n FormState,\n FormStateWithoutComponents,\n Row,\n} from './forms/Form.js'\n\nexport type {\n /**\n * @deprecated\n * The `CustomPreviewButton` type is deprecated and will be removed in the next major version.\n * This type is only used for the Payload Config. Use `PreviewButtonClientProps` instead.\n */\n CustomComponent as CustomPreviewButton,\n /**\n * @deprecated\n * The `CustomPublishButton` type is deprecated and will be removed in the next major version.\n * This type is only used for the Payload Config. Use `PreviewButtonClientProps` instead.\n */\n CustomComponent as CustomPublishButton,\n /**\n * @deprecated\n * The `CustomSaveButton` type is deprecated and will be removed in the next major version.\n * This type is only used for the Payload Config. Use `PreviewButtonClientProps` instead.\n */\n CustomComponent as CustomSaveButton,\n /**\n * @deprecated\n * The `CustomSaveDraftButton` type is deprecated and will be removed in the next major version.\n * This type is only used for the Payload Config. Use `PreviewButtonClientProps` instead.\n */\n CustomComponent as CustomSaveDraftButton,\n} from '../config/types.js'\nexport type { DefaultCellComponentProps, DefaultServerCellComponentProps } from './elements/Cell.js'\nexport type { ConditionalDateProps } from './elements/DatePicker.js'\nexport type { DayPickerProps, SharedProps, TimePickerProps } from './elements/DatePicker.js'\nexport type {\n EditMenuItemsClientProps,\n EditMenuItemsServerProps,\n EditMenuItemsServerPropsOnly,\n} from './elements/EditMenuItems.js'\nexport type {\n NavGroupPreferences,\n NavPreferences,\n SidebarTabClientProps,\n SidebarTabServerProps,\n SidebarTabServerPropsOnly,\n} from './elements/Nav.js'\nexport type {\n PreviewButtonClientProps,\n PreviewButtonServerProps,\n PreviewButtonServerPropsOnly,\n} from './elements/PreviewButton.js'\nexport type {\n PublishButtonClientProps,\n PublishButtonServerProps,\n PublishButtonServerPropsOnly,\n} from './elements/PublishButton.js'\nexport type {\n SaveButtonClientProps,\n SaveButtonServerProps,\n SaveButtonServerPropsOnly,\n} from './elements/SaveButton.js'\nexport type {\n SaveDraftButtonClientProps,\n SaveDraftButtonServerProps,\n SaveDraftButtonServerPropsOnly,\n} from './elements/SaveDraftButton.js'\nexport type { CustomStatus } from './elements/Status.js'\n\nexport type { Column } from './elements/Table.js'\n\nexport type {\n UnpublishButtonClientProps,\n UnpublishButtonServerProps,\n UnpublishButtonServerPropsOnly,\n} from './elements/UnpublishButton.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 ArrayFieldClientComponent,\n ArrayFieldClientProps,\n ArrayFieldDescriptionClientComponent,\n ArrayFieldDescriptionServerComponent,\n ArrayFieldDiffClientComponent,\n ArrayFieldDiffServerComponent,\n ArrayFieldErrorClientComponent,\n ArrayFieldErrorServerComponent,\n ArrayFieldLabelClientComponent,\n ArrayFieldLabelServerComponent,\n ArrayFieldServerComponent,\n ArrayFieldServerProps,\n} from './fields/Array.js'\n\nexport type {\n BlockRowLabelClientComponent,\n BlockRowLabelServerComponent,\n BlocksFieldClientComponent,\n BlocksFieldClientProps,\n BlocksFieldDescriptionClientComponent,\n BlocksFieldDescriptionServerComponent,\n BlocksFieldDiffClientComponent,\n BlocksFieldDiffServerComponent,\n BlocksFieldErrorClientComponent,\n BlocksFieldErrorServerComponent,\n BlocksFieldLabelClientComponent,\n BlocksFieldLabelServerComponent,\n BlocksFieldServerComponent,\n BlocksFieldServerProps,\n} from './fields/Blocks.js'\n\nexport type {\n CheckboxFieldClientComponent,\n CheckboxFieldClientProps,\n CheckboxFieldDescriptionClientComponent,\n CheckboxFieldDescriptionServerComponent,\n CheckboxFieldDiffClientComponent,\n CheckboxFieldDiffServerComponent,\n CheckboxFieldErrorClientComponent,\n CheckboxFieldErrorServerComponent,\n CheckboxFieldLabelClientComponent,\n CheckboxFieldLabelServerComponent,\n CheckboxFieldServerComponent,\n CheckboxFieldServerProps,\n} from './fields/Checkbox.js'\n\nexport type {\n CodeFieldClientComponent,\n CodeFieldClientProps,\n CodeFieldDescriptionClientComponent,\n CodeFieldDescriptionServerComponent,\n CodeFieldDiffClientComponent,\n CodeFieldDiffServerComponent,\n CodeFieldErrorClientComponent,\n CodeFieldErrorServerComponent,\n CodeFieldLabelClientComponent,\n CodeFieldLabelServerComponent,\n CodeFieldServerComponent,\n CodeFieldServerProps,\n} from './fields/Code.js'\n\nexport type {\n CollapsibleFieldClientComponent,\n CollapsibleFieldClientProps,\n CollapsibleFieldDescriptionClientComponent,\n CollapsibleFieldDescriptionServerComponent,\n CollapsibleFieldDiffClientComponent,\n CollapsibleFieldDiffServerComponent,\n CollapsibleFieldErrorClientComponent,\n CollapsibleFieldErrorServerComponent,\n CollapsibleFieldLabelClientComponent,\n CollapsibleFieldLabelServerComponent,\n CollapsibleFieldServerComponent,\n CollapsibleFieldServerProps,\n} from './fields/Collapsible.js'\n\nexport type {\n DateFieldClientComponent,\n DateFieldClientProps,\n DateFieldDescriptionClientComponent,\n DateFieldDescriptionServerComponent,\n DateFieldDiffClientComponent,\n DateFieldDiffServerComponent,\n DateFieldErrorClientComponent,\n DateFieldErrorServerComponent,\n DateFieldLabelClientComponent,\n DateFieldLabelServerComponent,\n DateFieldServerComponent,\n DateFieldServerProps,\n} from './fields/Date.js'\n\nexport type {\n EmailFieldClientComponent,\n EmailFieldClientProps,\n EmailFieldDescriptionClientComponent,\n EmailFieldDescriptionServerComponent,\n EmailFieldDiffClientComponent,\n EmailFieldDiffServerComponent,\n EmailFieldErrorClientComponent,\n EmailFieldErrorServerComponent,\n EmailFieldLabelClientComponent,\n EmailFieldLabelServerComponent,\n EmailFieldServerComponent,\n EmailFieldServerProps,\n} from './fields/Email.js'\n\nexport type {\n GroupFieldClientComponent,\n GroupFieldClientProps,\n GroupFieldDescriptionClientComponent,\n GroupFieldDescriptionServerComponent,\n GroupFieldDiffClientComponent,\n GroupFieldDiffServerComponent,\n GroupFieldErrorClientComponent,\n GroupFieldErrorServerComponent,\n GroupFieldLabelClientComponent,\n GroupFieldLabelServerComponent,\n GroupFieldServerComponent,\n GroupFieldServerProps,\n} from './fields/Group.js'\n\nexport type { HiddenFieldProps } from './fields/Hidden.js'\n\nexport type {\n JoinFieldClientComponent,\n JoinFieldClientProps,\n JoinFieldDescriptionClientComponent,\n JoinFieldDescriptionServerComponent,\n JoinFieldDiffClientComponent,\n JoinFieldDiffServerComponent,\n JoinFieldErrorClientComponent,\n JoinFieldErrorServerComponent,\n JoinFieldLabelClientComponent,\n JoinFieldLabelServerComponent,\n JoinFieldServerComponent,\n JoinFieldServerProps,\n} from './fields/Join.js'\n\nexport type {\n JSONFieldClientComponent,\n JSONFieldClientProps,\n JSONFieldDescriptionClientComponent,\n JSONFieldDescriptionServerComponent,\n JSONFieldDiffClientComponent,\n JSONFieldDiffServerComponent,\n JSONFieldErrorClientComponent,\n JSONFieldErrorServerComponent,\n JSONFieldLabelClientComponent,\n JSONFieldLabelServerComponent,\n JSONFieldServerComponent,\n JSONFieldServerProps,\n} from './fields/JSON.js'\n\nexport type {\n NumberFieldClientComponent,\n NumberFieldClientProps,\n NumberFieldDescriptionClientComponent,\n NumberFieldDescriptionServerComponent,\n NumberFieldDiffClientComponent,\n NumberFieldDiffServerComponent,\n NumberFieldErrorClientComponent,\n NumberFieldErrorServerComponent,\n NumberFieldLabelClientComponent,\n NumberFieldLabelServerComponent,\n NumberFieldServerComponent,\n NumberFieldServerProps,\n} from './fields/Number.js'\n\nexport type {\n PointFieldClientComponent,\n PointFieldClientProps,\n PointFieldDescriptionClientComponent,\n PointFieldDescriptionServerComponent,\n PointFieldDiffClientComponent,\n PointFieldDiffServerComponent,\n PointFieldErrorClientComponent,\n PointFieldErrorServerComponent,\n PointFieldLabelClientComponent,\n PointFieldLabelServerComponent,\n PointFieldServerComponent,\n PointFieldServerProps,\n} from './fields/Point.js'\n\nexport type {\n RadioFieldClientComponent,\n RadioFieldClientProps,\n RadioFieldDescriptionClientComponent,\n RadioFieldDescriptionServerComponent,\n RadioFieldDiffClientComponent,\n RadioFieldDiffServerComponent,\n RadioFieldErrorClientComponent,\n RadioFieldErrorServerComponent,\n RadioFieldLabelClientComponent,\n RadioFieldLabelServerComponent,\n RadioFieldServerComponent,\n RadioFieldServerProps,\n} from './fields/Radio.js'\n\nexport type {\n RelationshipFieldClientComponent,\n RelationshipFieldClientProps,\n RelationshipFieldDescriptionClientComponent,\n RelationshipFieldDescriptionServerComponent,\n RelationshipFieldDiffClientComponent,\n RelationshipFieldDiffServerComponent,\n RelationshipFieldErrorClientComponent,\n RelationshipFieldErrorServerComponent,\n RelationshipFieldLabelClientComponent,\n RelationshipFieldLabelServerComponent,\n RelationshipFieldServerComponent,\n RelationshipFieldServerProps,\n} from './fields/Relationship.js'\n\nexport type {\n RichTextFieldClientComponent,\n RichTextFieldClientProps,\n RichTextFieldDescriptionClientComponent,\n RichTextFieldDescriptionServerComponent,\n RichTextFieldDiffClientComponent,\n RichTextFieldDiffServerComponent,\n RichTextFieldErrorClientComponent,\n RichTextFieldErrorServerComponent,\n RichTextFieldLabelClientComponent,\n RichTextFieldLabelServerComponent,\n RichTextFieldServerComponent,\n RichTextFieldServerProps,\n} from './fields/RichText.js'\n\nexport type {\n RowFieldClientComponent,\n RowFieldClientProps,\n RowFieldDescriptionClientComponent,\n RowFieldDescriptionServerComponent,\n RowFieldDiffClientComponent,\n RowFieldDiffServerComponent,\n RowFieldErrorClientComponent,\n RowFieldErrorServerComponent,\n RowFieldLabelClientComponent,\n RowFieldLabelServerComponent,\n RowFieldServerComponent,\n RowFieldServerProps,\n} from './fields/Row.js'\n\nexport type {\n SelectFieldClientComponent,\n SelectFieldClientProps,\n SelectFieldDescriptionClientComponent,\n SelectFieldDescriptionServerComponent,\n SelectFieldDiffClientComponent,\n SelectFieldDiffServerComponent,\n SelectFieldErrorClientComponent,\n SelectFieldErrorServerComponent,\n SelectFieldLabelClientComponent,\n SelectFieldLabelServerComponent,\n SelectFieldServerComponent,\n SelectFieldServerProps,\n} from './fields/Select.js'\n\nexport type {\n ClientTab,\n TabsFieldClientComponent,\n TabsFieldClientProps,\n TabsFieldDescriptionClientComponent,\n TabsFieldDescriptionServerComponent,\n TabsFieldDiffClientComponent,\n TabsFieldDiffServerComponent,\n TabsFieldErrorClientComponent,\n TabsFieldErrorServerComponent,\n TabsFieldLabelClientComponent,\n TabsFieldLabelServerComponent,\n TabsFieldServerComponent,\n TabsFieldServerProps,\n} from './fields/Tabs.js'\n\nexport type {\n TextFieldClientComponent,\n TextFieldClientProps,\n TextFieldDescriptionClientComponent,\n TextFieldDescriptionServerComponent,\n TextFieldDiffClientComponent,\n TextFieldDiffServerComponent,\n TextFieldErrorClientComponent,\n TextFieldErrorServerComponent,\n TextFieldLabelClientComponent,\n TextFieldLabelServerComponent,\n TextFieldServerComponent,\n TextFieldServerProps,\n} from './fields/Text.js'\n\nexport type {\n TextareaFieldClientComponent,\n TextareaFieldClientProps,\n TextareaFieldDescriptionClientComponent,\n TextareaFieldDescriptionServerComponent,\n TextareaFieldDiffClientComponent,\n TextareaFieldDiffServerComponent,\n TextareaFieldErrorClientComponent,\n TextareaFieldErrorServerComponent,\n TextareaFieldLabelClientComponent,\n TextareaFieldLabelServerComponent,\n TextareaFieldServerComponent,\n TextareaFieldServerProps,\n} from './fields/Textarea.js'\n\nexport type {\n UIFieldClientComponent,\n UIFieldClientProps,\n UIFieldDiffClientComponent,\n UIFieldDiffServerComponent,\n UIFieldServerComponent,\n UIFieldServerProps,\n} from './fields/UI.js'\n\nexport type {\n UploadFieldClientComponent,\n UploadFieldClientProps,\n UploadFieldDescriptionClientComponent,\n UploadFieldDescriptionServerComponent,\n UploadFieldDiffClientComponent,\n UploadFieldDiffServerComponent,\n UploadFieldErrorClientComponent,\n UploadFieldErrorServerComponent,\n UploadFieldLabelClientComponent,\n UploadFieldLabelServerComponent,\n UploadFieldServerComponent,\n UploadFieldServerProps,\n} from './fields/Upload.js'\n\nexport type {\n Description,\n DescriptionFunction,\n FieldDescriptionClientComponent,\n FieldDescriptionClientProps,\n FieldDescriptionServerComponent,\n FieldDescriptionServerProps,\n GenericDescriptionProps,\n StaticDescription,\n} from './forms/Description.js'\n\nexport type {\n BaseVersionField,\n DiffMethod,\n FieldDiffClientComponent,\n FieldDiffClientProps,\n FieldDiffServerComponent,\n FieldDiffServerProps,\n VersionField,\n VersionTab,\n} from './forms/Diff.js'\n\nexport type {\n BuildFormStateArgs,\n Data,\n FieldState as FormField,\n FieldStateWithoutComponents as FormFieldWithoutComponents,\n FilterOptionsResult,\n FormState,\n FormStateWithoutComponents,\n Row,\n}\n\nexport type {\n FieldErrorClientComponent,\n FieldErrorClientProps,\n FieldErrorServerComponent,\n FieldErrorServerProps,\n GenericErrorProps,\n} from './forms/Error.js'\n\nexport type {\n ClientComponentProps,\n ClientFieldBase,\n ClientFieldWithOptionalType,\n FieldClientComponent,\n FieldPaths,\n FieldServerComponent,\n ServerComponentProps,\n ServerFieldBase,\n} from './forms/Field.js'\n\nexport type {\n FieldLabelClientComponent,\n FieldLabelClientProps,\n FieldLabelServerComponent,\n FieldLabelServerProps,\n GenericLabelProps,\n SanitizedLabelProps,\n} from './forms/Label.js'\n\nexport type { RowLabel, RowLabelComponent } from './forms/RowLabel.js'\n\nexport type MappedServerComponent<TComponentClientProps extends JsonObject = JsonObject> = {\n Component?: React.ComponentType<TComponentClientProps>\n props?: Partial<any>\n RenderedComponent: React.ReactNode\n type: 'server'\n}\n\nexport type MappedClientComponent<TComponentClientProps extends JsonObject = JsonObject> = {\n Component?: React.ComponentType<TComponentClientProps>\n props?: Partial<TComponentClientProps>\n RenderedComponent?: React.ReactNode\n type: 'client'\n}\n\nexport type MappedEmptyComponent = {\n type: 'empty'\n}\n\nexport enum Action {\n RenderConfig = 'render-config',\n}\n\nexport type RenderEntityConfigArgs = {\n collectionSlug?: string\n data?: Data\n globalSlug?: string\n}\n\nexport type RenderRootConfigArgs = {}\n\nexport type RenderFieldConfigArgs = {\n collectionSlug?: string\n formState?: FormState\n globalSlug?: string\n schemaPath: string\n}\n\nexport type RenderConfigArgs = {\n action: Action.RenderConfig\n config: Promise<SanitizedConfig> | SanitizedConfig\n i18n: I18nClient\n importMap: ImportMap\n languageCode: AcceptedLanguages\n serverProps?: any\n} & (RenderEntityConfigArgs | RenderFieldConfigArgs | RenderRootConfigArgs)\n\nexport type PayloadServerAction = (\n args:\n | {\n [key: string]: any\n action: Action\n i18n: I18nClient\n }\n | RenderConfigArgs,\n) => Promise<string>\n\nexport type RenderedField = {\n Field: React.ReactNode\n indexPath?: string\n initialSchemaPath?: string\n /**\n * @deprecated\n * This is a legacy property that will be removed in v4.\n * Please use `fieldIsSidebar(field)` from `payload` instead.\n * Or check `field.admin.position === 'sidebar'` directly.\n */\n isSidebar: boolean\n path: string\n schemaPath: string\n type: FieldTypes\n}\n\nexport type FieldRow = {\n RowLabel?: React.ReactNode\n}\n\nexport type DocumentSlots = {\n BeforeDocumentControls?: React.ReactNode\n BeforeDocumentMeta?: React.ReactNode\n Description?: React.ReactNode\n EditMenuItems?: React.ReactNode\n LivePreview?: React.ReactNode\n PreviewButton?: React.ReactNode\n PublishButton?: React.ReactNode\n SaveButton?: React.ReactNode\n SaveDraftButton?: React.ReactNode\n Status?: React.ReactNode\n UnpublishButton?: React.ReactNode\n Upload?: React.ReactNode\n UploadControls?: React.ReactNode\n}\n\nexport type {\n BuildTableStateArgs,\n DefaultServerFunctionArgs,\n InitReqResult,\n ListQuery,\n ServerFunction,\n ServerFunctionArgs,\n ServerFunctionClient,\n ServerFunctionClientArgs,\n ServerFunctionConfig,\n ServerFunctionHandler,\n SlugifyServerFunctionArgs,\n} from './functions/index.js'\n\nexport type { LanguageOptions } from './LanguageOptions.js'\n\nexport type { RichTextAdapter, RichTextAdapterProvider, RichTextHooks } from './RichText.js'\n\nexport { type WidgetServerProps } from './views/dashboard.js'\n\nexport type {\n BeforeDocumentControlsClientProps,\n BeforeDocumentControlsServerProps,\n BeforeDocumentControlsServerPropsOnly,\n DocumentSubViewTypes,\n DocumentTabClientProps,\n /**\n * @deprecated\n * The `DocumentTabComponent` type is deprecated and will be removed in the next major version.\n * Use `DocumentTabServerProps`or `DocumentTabClientProps` instead.\n */\n DocumentTabComponent,\n DocumentTabCondition,\n DocumentTabConfig,\n /**\n * @deprecated\n * The `DocumentTabProps` type is deprecated and will be removed in the next major version.\n * Use `DocumentTabServerProps` instead.\n */\n DocumentTabServerProps as DocumentTabProps,\n DocumentTabServerProps,\n DocumentTabServerPropsOnly,\n /**\n * @deprecated\n * The `ClientSideEditViewProps` type is deprecated and will be removed in the next major version.\n * Use `DocumentViewClientProps` instead.\n */\n DocumentViewClientProps as ClientSideEditViewProps,\n DocumentViewClientProps,\n /**\n * @deprecated\n * The `ServerSideEditViewProps` is deprecated and will be removed in the next major version.\n * Use `DocumentViewServerProps` instead.\n */\n DocumentViewServerProps as ServerSideEditViewProps,\n DocumentViewServerProps,\n DocumentViewServerPropsOnly,\n EditViewProps,\n RenderDocumentVersionsProperties,\n} from './views/document.js'\n\nexport type { RelatedDocumentsGrouped } from './views/hierarchyList.js'\n\nexport type {\n AdminViewClientProps,\n /**\n * @deprecated\n * The `AdminViewComponent` type is deprecated and will be removed in the next major version.\n * Type your component props directly instead.\n */\n AdminViewComponent,\n AdminViewConfig,\n /**\n * @deprecated\n * The `AdminViewProps` type is deprecated and will be removed in the next major version.\n * Use `AdminViewServerProps` instead.\n */\n AdminViewServerProps as AdminViewProps,\n AdminViewServerProps,\n AdminViewServerPropsOnly,\n InitPageResult,\n ServerPropsFromView,\n ViewDescriptionClientProps,\n ViewDescriptionServerProps,\n ViewDescriptionServerPropsOnly,\n ViewTypes,\n VisibleEntities,\n} from './views/index.js'\n\nexport type {\n AfterListClientProps,\n AfterListServerProps,\n AfterListServerPropsOnly,\n AfterListTableClientProps,\n AfterListTableServerProps,\n AfterListTableServerPropsOnly,\n BeforeListClientProps,\n BeforeListServerProps,\n BeforeListServerPropsOnly,\n BeforeListTableClientProps,\n BeforeListTableServerProps,\n BeforeListTableServerPropsOnly,\n HierarchyViewData,\n ListViewClientProps,\n ListViewServerProps,\n ListViewServerPropsOnly,\n ListViewSlots,\n ListViewSlotSharedClientProps,\n NoResultsClientProps,\n NoResultsServerProps,\n NoResultsServerPropsOnly,\n} from './views/list.js'\n\ntype SchemaPath = {} & string\nexport type FieldSchemaMap = Map<\n SchemaPath,\n | {\n fields: Field[]\n }\n | Block\n | Field\n | Tab\n>\n\nexport type ClientFieldSchemaMap = Map<\n SchemaPath,\n | {\n fields: ClientField[]\n }\n | ClientBlock\n | ClientField\n | ClientTab\n>\n\nexport type DocumentEvent = {\n doc?: TypeWithID\n drawerSlug?: string\n entitySlug: string\n id?: number | string\n operation: 'create' | 'update'\n updatedAt: string\n}\n"],"names":["Action"],"mappings":"AAmgBA,OAAO,IAAA,AAAKA,gCAAAA;;WAAAA;MAEX"}
|
|
1
|
+
{"version":3,"sources":["../../src/admin/types.ts"],"sourcesContent":["import type { AcceptedLanguages, I18nClient } from '@payloadcms/translations'\nimport type React from 'react'\n\nimport type { ImportMap } from '../bin/generateImportMap/index.js'\nimport type { TypeWithID } from '../collections/config/types.js'\nimport type { SanitizedConfig } from '../config/types.js'\nimport type {\n Block,\n ClientBlock,\n ClientField,\n Field,\n FieldTypes,\n Tab,\n} from '../fields/config/types.js'\nimport type { JsonObject } from '../types/index.js'\nimport type { ClientTab } from './fields/Tabs.js'\nimport type {\n BuildFormStateArgs,\n Data,\n FieldState,\n FieldStateWithoutComponents,\n FilterOptionsResult,\n FormState,\n FormStateWithoutComponents,\n Row,\n} from './forms/Form.js'\n\nexport type {\n /**\n * @deprecated\n * The `CustomPreviewButton` type is deprecated and will be removed in the next major version.\n * This type is only used for the Payload Config. Use `PreviewButtonClientProps` instead.\n */\n CustomComponent as CustomPreviewButton,\n /**\n * @deprecated\n * The `CustomPublishButton` type is deprecated and will be removed in the next major version.\n * This type is only used for the Payload Config. Use `PreviewButtonClientProps` instead.\n */\n CustomComponent as CustomPublishButton,\n /**\n * @deprecated\n * The `CustomSaveButton` type is deprecated and will be removed in the next major version.\n * This type is only used for the Payload Config. Use `PreviewButtonClientProps` instead.\n */\n CustomComponent as CustomSaveButton,\n /**\n * @deprecated\n * The `CustomSaveDraftButton` type is deprecated and will be removed in the next major version.\n * This type is only used for the Payload Config. Use `PreviewButtonClientProps` instead.\n */\n CustomComponent as CustomSaveDraftButton,\n} from '../config/types.js'\nexport type { DefaultCellComponentProps, DefaultServerCellComponentProps } from './elements/Cell.js'\nexport type { ConditionalDateProps } from './elements/DatePicker.js'\nexport type { DayPickerProps, SharedProps, TimePickerProps } from './elements/DatePicker.js'\nexport type {\n EditMenuItemsClientProps,\n EditMenuItemsServerProps,\n EditMenuItemsServerPropsOnly,\n} from './elements/EditMenuItems.js'\nexport type {\n NavGroupPreferences,\n NavPreferences,\n SidebarTabClientProps,\n SidebarTabServerProps,\n SidebarTabServerPropsOnly,\n} from './elements/Nav.js'\nexport type {\n PreviewButtonClientProps,\n PreviewButtonServerProps,\n PreviewButtonServerPropsOnly,\n} from './elements/PreviewButton.js'\nexport type {\n PublishButtonClientProps,\n PublishButtonServerProps,\n PublishButtonServerPropsOnly,\n} from './elements/PublishButton.js'\nexport type {\n SaveButtonClientProps,\n SaveButtonServerProps,\n SaveButtonServerPropsOnly,\n} from './elements/SaveButton.js'\nexport type {\n SaveDraftButtonClientProps,\n SaveDraftButtonServerProps,\n SaveDraftButtonServerPropsOnly,\n} from './elements/SaveDraftButton.js'\nexport type { CustomStatus } from './elements/Status.js'\n\nexport type { Column } from './elements/Table.js'\n\nexport type {\n UnpublishButtonClientProps,\n UnpublishButtonServerProps,\n UnpublishButtonServerPropsOnly,\n} from './elements/UnpublishButton.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 ArrayFieldClientComponent,\n ArrayFieldClientProps,\n ArrayFieldDescriptionClientComponent,\n ArrayFieldDescriptionServerComponent,\n ArrayFieldDiffClientComponent,\n ArrayFieldDiffServerComponent,\n ArrayFieldErrorClientComponent,\n ArrayFieldErrorServerComponent,\n ArrayFieldLabelClientComponent,\n ArrayFieldLabelServerComponent,\n ArrayFieldServerComponent,\n ArrayFieldServerProps,\n} from './fields/Array.js'\n\nexport type {\n BlockRowLabelClientComponent,\n BlockRowLabelServerComponent,\n BlocksFieldClientComponent,\n BlocksFieldClientProps,\n BlocksFieldDescriptionClientComponent,\n BlocksFieldDescriptionServerComponent,\n BlocksFieldDiffClientComponent,\n BlocksFieldDiffServerComponent,\n BlocksFieldErrorClientComponent,\n BlocksFieldErrorServerComponent,\n BlocksFieldLabelClientComponent,\n BlocksFieldLabelServerComponent,\n BlocksFieldServerComponent,\n BlocksFieldServerProps,\n} from './fields/Blocks.js'\n\nexport type {\n CheckboxFieldClientComponent,\n CheckboxFieldClientProps,\n CheckboxFieldDescriptionClientComponent,\n CheckboxFieldDescriptionServerComponent,\n CheckboxFieldDiffClientComponent,\n CheckboxFieldDiffServerComponent,\n CheckboxFieldErrorClientComponent,\n CheckboxFieldErrorServerComponent,\n CheckboxFieldLabelClientComponent,\n CheckboxFieldLabelServerComponent,\n CheckboxFieldServerComponent,\n CheckboxFieldServerProps,\n} from './fields/Checkbox.js'\n\nexport type {\n CodeFieldClientComponent,\n CodeFieldClientProps,\n CodeFieldDescriptionClientComponent,\n CodeFieldDescriptionServerComponent,\n CodeFieldDiffClientComponent,\n CodeFieldDiffServerComponent,\n CodeFieldErrorClientComponent,\n CodeFieldErrorServerComponent,\n CodeFieldLabelClientComponent,\n CodeFieldLabelServerComponent,\n CodeFieldServerComponent,\n CodeFieldServerProps,\n} from './fields/Code.js'\n\nexport type {\n CollapsibleFieldClientComponent,\n CollapsibleFieldClientProps,\n CollapsibleFieldDescriptionClientComponent,\n CollapsibleFieldDescriptionServerComponent,\n CollapsibleFieldDiffClientComponent,\n CollapsibleFieldDiffServerComponent,\n CollapsibleFieldErrorClientComponent,\n CollapsibleFieldErrorServerComponent,\n CollapsibleFieldLabelClientComponent,\n CollapsibleFieldLabelServerComponent,\n CollapsibleFieldServerComponent,\n CollapsibleFieldServerProps,\n} from './fields/Collapsible.js'\n\nexport type {\n DateFieldClientComponent,\n DateFieldClientProps,\n DateFieldDescriptionClientComponent,\n DateFieldDescriptionServerComponent,\n DateFieldDiffClientComponent,\n DateFieldDiffServerComponent,\n DateFieldErrorClientComponent,\n DateFieldErrorServerComponent,\n DateFieldLabelClientComponent,\n DateFieldLabelServerComponent,\n DateFieldServerComponent,\n DateFieldServerProps,\n} from './fields/Date.js'\n\nexport type {\n EmailFieldClientComponent,\n EmailFieldClientProps,\n EmailFieldDescriptionClientComponent,\n EmailFieldDescriptionServerComponent,\n EmailFieldDiffClientComponent,\n EmailFieldDiffServerComponent,\n EmailFieldErrorClientComponent,\n EmailFieldErrorServerComponent,\n EmailFieldLabelClientComponent,\n EmailFieldLabelServerComponent,\n EmailFieldServerComponent,\n EmailFieldServerProps,\n} from './fields/Email.js'\n\nexport type {\n GroupFieldClientComponent,\n GroupFieldClientProps,\n GroupFieldDescriptionClientComponent,\n GroupFieldDescriptionServerComponent,\n GroupFieldDiffClientComponent,\n GroupFieldDiffServerComponent,\n GroupFieldErrorClientComponent,\n GroupFieldErrorServerComponent,\n GroupFieldLabelClientComponent,\n GroupFieldLabelServerComponent,\n GroupFieldServerComponent,\n GroupFieldServerProps,\n} from './fields/Group.js'\n\nexport type { HiddenFieldProps } from './fields/Hidden.js'\n\nexport type {\n JoinFieldClientComponent,\n JoinFieldClientProps,\n JoinFieldDescriptionClientComponent,\n JoinFieldDescriptionServerComponent,\n JoinFieldDiffClientComponent,\n JoinFieldDiffServerComponent,\n JoinFieldErrorClientComponent,\n JoinFieldErrorServerComponent,\n JoinFieldLabelClientComponent,\n JoinFieldLabelServerComponent,\n JoinFieldServerComponent,\n JoinFieldServerProps,\n} from './fields/Join.js'\n\nexport type {\n JSONFieldClientComponent,\n JSONFieldClientProps,\n JSONFieldDescriptionClientComponent,\n JSONFieldDescriptionServerComponent,\n JSONFieldDiffClientComponent,\n JSONFieldDiffServerComponent,\n JSONFieldErrorClientComponent,\n JSONFieldErrorServerComponent,\n JSONFieldLabelClientComponent,\n JSONFieldLabelServerComponent,\n JSONFieldServerComponent,\n JSONFieldServerProps,\n} from './fields/JSON.js'\n\nexport type {\n NumberFieldClientComponent,\n NumberFieldClientProps,\n NumberFieldDescriptionClientComponent,\n NumberFieldDescriptionServerComponent,\n NumberFieldDiffClientComponent,\n NumberFieldDiffServerComponent,\n NumberFieldErrorClientComponent,\n NumberFieldErrorServerComponent,\n NumberFieldLabelClientComponent,\n NumberFieldLabelServerComponent,\n NumberFieldServerComponent,\n NumberFieldServerProps,\n} from './fields/Number.js'\n\nexport type {\n PointFieldClientComponent,\n PointFieldClientProps,\n PointFieldDescriptionClientComponent,\n PointFieldDescriptionServerComponent,\n PointFieldDiffClientComponent,\n PointFieldDiffServerComponent,\n PointFieldErrorClientComponent,\n PointFieldErrorServerComponent,\n PointFieldLabelClientComponent,\n PointFieldLabelServerComponent,\n PointFieldServerComponent,\n PointFieldServerProps,\n} from './fields/Point.js'\n\nexport type {\n RadioFieldClientComponent,\n RadioFieldClientProps,\n RadioFieldDescriptionClientComponent,\n RadioFieldDescriptionServerComponent,\n RadioFieldDiffClientComponent,\n RadioFieldDiffServerComponent,\n RadioFieldErrorClientComponent,\n RadioFieldErrorServerComponent,\n RadioFieldLabelClientComponent,\n RadioFieldLabelServerComponent,\n RadioFieldServerComponent,\n RadioFieldServerProps,\n} from './fields/Radio.js'\n\nexport type {\n RelationshipFieldClientComponent,\n RelationshipFieldClientProps,\n RelationshipFieldDescriptionClientComponent,\n RelationshipFieldDescriptionServerComponent,\n RelationshipFieldDiffClientComponent,\n RelationshipFieldDiffServerComponent,\n RelationshipFieldErrorClientComponent,\n RelationshipFieldErrorServerComponent,\n RelationshipFieldLabelClientComponent,\n RelationshipFieldLabelServerComponent,\n RelationshipFieldServerComponent,\n RelationshipFieldServerProps,\n} from './fields/Relationship.js'\n\nexport type {\n RichTextFieldClientComponent,\n RichTextFieldClientProps,\n RichTextFieldDescriptionClientComponent,\n RichTextFieldDescriptionServerComponent,\n RichTextFieldDiffClientComponent,\n RichTextFieldDiffServerComponent,\n RichTextFieldErrorClientComponent,\n RichTextFieldErrorServerComponent,\n RichTextFieldLabelClientComponent,\n RichTextFieldLabelServerComponent,\n RichTextFieldServerComponent,\n RichTextFieldServerProps,\n} from './fields/RichText.js'\n\nexport type {\n RowFieldClientComponent,\n RowFieldClientProps,\n RowFieldDescriptionClientComponent,\n RowFieldDescriptionServerComponent,\n RowFieldDiffClientComponent,\n RowFieldDiffServerComponent,\n RowFieldErrorClientComponent,\n RowFieldErrorServerComponent,\n RowFieldLabelClientComponent,\n RowFieldLabelServerComponent,\n RowFieldServerComponent,\n RowFieldServerProps,\n} from './fields/Row.js'\n\nexport type {\n SelectFieldClientComponent,\n SelectFieldClientProps,\n SelectFieldDescriptionClientComponent,\n SelectFieldDescriptionServerComponent,\n SelectFieldDiffClientComponent,\n SelectFieldDiffServerComponent,\n SelectFieldErrorClientComponent,\n SelectFieldErrorServerComponent,\n SelectFieldLabelClientComponent,\n SelectFieldLabelServerComponent,\n SelectFieldServerComponent,\n SelectFieldServerProps,\n} from './fields/Select.js'\n\nexport type {\n ClientTab,\n TabsFieldClientComponent,\n TabsFieldClientProps,\n TabsFieldDescriptionClientComponent,\n TabsFieldDescriptionServerComponent,\n TabsFieldDiffClientComponent,\n TabsFieldDiffServerComponent,\n TabsFieldErrorClientComponent,\n TabsFieldErrorServerComponent,\n TabsFieldLabelClientComponent,\n TabsFieldLabelServerComponent,\n TabsFieldServerComponent,\n TabsFieldServerProps,\n} from './fields/Tabs.js'\n\nexport type {\n TextFieldClientComponent,\n TextFieldClientProps,\n TextFieldDescriptionClientComponent,\n TextFieldDescriptionServerComponent,\n TextFieldDiffClientComponent,\n TextFieldDiffServerComponent,\n TextFieldErrorClientComponent,\n TextFieldErrorServerComponent,\n TextFieldLabelClientComponent,\n TextFieldLabelServerComponent,\n TextFieldServerComponent,\n TextFieldServerProps,\n} from './fields/Text.js'\n\nexport type {\n TextareaFieldClientComponent,\n TextareaFieldClientProps,\n TextareaFieldDescriptionClientComponent,\n TextareaFieldDescriptionServerComponent,\n TextareaFieldDiffClientComponent,\n TextareaFieldDiffServerComponent,\n TextareaFieldErrorClientComponent,\n TextareaFieldErrorServerComponent,\n TextareaFieldLabelClientComponent,\n TextareaFieldLabelServerComponent,\n TextareaFieldServerComponent,\n TextareaFieldServerProps,\n} from './fields/Textarea.js'\n\nexport type {\n UIFieldClientComponent,\n UIFieldClientProps,\n UIFieldDiffClientComponent,\n UIFieldDiffServerComponent,\n UIFieldServerComponent,\n UIFieldServerProps,\n} from './fields/UI.js'\n\nexport type {\n UploadFieldClientComponent,\n UploadFieldClientProps,\n UploadFieldDescriptionClientComponent,\n UploadFieldDescriptionServerComponent,\n UploadFieldDiffClientComponent,\n UploadFieldDiffServerComponent,\n UploadFieldErrorClientComponent,\n UploadFieldErrorServerComponent,\n UploadFieldLabelClientComponent,\n UploadFieldLabelServerComponent,\n UploadFieldServerComponent,\n UploadFieldServerProps,\n} from './fields/Upload.js'\n\nexport type {\n Description,\n DescriptionFunction,\n FieldDescriptionClientComponent,\n FieldDescriptionClientProps,\n FieldDescriptionServerComponent,\n FieldDescriptionServerProps,\n GenericDescriptionProps,\n StaticDescription,\n} from './forms/Description.js'\n\nexport type {\n BaseVersionField,\n DiffMethod,\n FieldDiffClientComponent,\n FieldDiffClientProps,\n FieldDiffServerComponent,\n FieldDiffServerProps,\n VersionField,\n VersionTab,\n} from './forms/Diff.js'\n\nexport type {\n BuildFormStateArgs,\n Data,\n FieldState as FormField,\n FieldStateWithoutComponents as FormFieldWithoutComponents,\n FilterOptionsResult,\n FormState,\n FormStateWithoutComponents,\n Row,\n}\n\nexport type {\n FieldErrorClientComponent,\n FieldErrorClientProps,\n FieldErrorServerComponent,\n FieldErrorServerProps,\n GenericErrorProps,\n} from './forms/Error.js'\n\nexport type {\n ClientComponentProps,\n ClientFieldBase,\n ClientFieldWithOptionalType,\n FieldClientComponent,\n FieldPaths,\n FieldServerComponent,\n ServerComponentProps,\n ServerFieldBase,\n} from './forms/Field.js'\n\nexport type {\n FieldLabelClientComponent,\n FieldLabelClientProps,\n FieldLabelServerComponent,\n FieldLabelServerProps,\n GenericLabelProps,\n SanitizedLabelProps,\n} from './forms/Label.js'\n\nexport type { RowLabel, RowLabelComponent } from './forms/RowLabel.js'\n\nexport type MappedServerComponent<TComponentClientProps extends JsonObject = JsonObject> = {\n Component?: React.ComponentType<TComponentClientProps>\n props?: Partial<any>\n RenderedComponent: React.ReactNode\n type: 'server'\n}\n\nexport type MappedClientComponent<TComponentClientProps extends JsonObject = JsonObject> = {\n Component?: React.ComponentType<TComponentClientProps>\n props?: Partial<TComponentClientProps>\n RenderedComponent?: React.ReactNode\n type: 'client'\n}\n\nexport type MappedEmptyComponent = {\n type: 'empty'\n}\n\nexport enum Action {\n RenderConfig = 'render-config',\n}\n\nexport type RenderEntityConfigArgs = {\n collectionSlug?: string\n data?: Data\n globalSlug?: string\n}\n\nexport type RenderRootConfigArgs = {}\n\nexport type RenderFieldConfigArgs = {\n collectionSlug?: string\n formState?: FormState\n globalSlug?: string\n schemaPath: string\n}\n\nexport type RenderConfigArgs = {\n action: Action.RenderConfig\n config: Promise<SanitizedConfig> | SanitizedConfig\n i18n: I18nClient\n importMap: ImportMap\n languageCode: AcceptedLanguages\n serverProps?: any\n} & (RenderEntityConfigArgs | RenderFieldConfigArgs | RenderRootConfigArgs)\n\nexport type PayloadServerAction = (\n args:\n | {\n [key: string]: any\n action: Action\n i18n: I18nClient\n }\n | RenderConfigArgs,\n) => Promise<string>\n\nexport type RenderedField = {\n Field: React.ReactNode\n indexPath?: string\n initialSchemaPath?: string\n /**\n * @deprecated\n * This is a legacy property that will be removed in v4.\n * Please use `fieldIsSidebar(field)` from `payload` instead.\n * Or check `field.admin.position === 'sidebar'` directly.\n */\n isSidebar: boolean\n path: string\n schemaPath: string\n type: FieldTypes\n}\n\nexport type FieldRow = {\n RowLabel?: React.ReactNode\n}\n\nexport type DocumentSlots = {\n BeforeDocumentControls?: React.ReactNode\n BeforeDocumentMeta?: React.ReactNode\n Description?: React.ReactNode\n EditMenuItems?: React.ReactNode\n LivePreview?: React.ReactNode\n PreviewButton?: React.ReactNode\n PublishButton?: React.ReactNode\n SaveButton?: React.ReactNode\n SaveDraftButton?: React.ReactNode\n Status?: React.ReactNode\n UnpublishButton?: React.ReactNode\n Upload?: React.ReactNode\n UploadControls?: React.ReactNode\n UploadFilePreview?: React.ReactNode\n}\n\nexport type {\n BuildTableStateArgs,\n DefaultServerFunctionArgs,\n InitReqResult,\n ListQuery,\n ServerFunction,\n ServerFunctionArgs,\n ServerFunctionClient,\n ServerFunctionClientArgs,\n ServerFunctionConfig,\n ServerFunctionHandler,\n SlugifyServerFunctionArgs,\n} from './functions/index.js'\n\nexport type { LanguageOptions } from './LanguageOptions.js'\n\nexport type { RichTextAdapter, RichTextAdapterProvider, RichTextHooks } from './RichText.js'\n\nexport { type WidgetServerProps } from './views/dashboard.js'\n\nexport type {\n BeforeDocumentControlsClientProps,\n BeforeDocumentControlsServerProps,\n BeforeDocumentControlsServerPropsOnly,\n DocumentSubViewTypes,\n DocumentTabClientProps,\n /**\n * @deprecated\n * The `DocumentTabComponent` type is deprecated and will be removed in the next major version.\n * Use `DocumentTabServerProps`or `DocumentTabClientProps` instead.\n */\n DocumentTabComponent,\n DocumentTabCondition,\n DocumentTabConfig,\n /**\n * @deprecated\n * The `DocumentTabProps` type is deprecated and will be removed in the next major version.\n * Use `DocumentTabServerProps` instead.\n */\n DocumentTabServerProps as DocumentTabProps,\n DocumentTabServerProps,\n DocumentTabServerPropsOnly,\n /**\n * @deprecated\n * The `ClientSideEditViewProps` type is deprecated and will be removed in the next major version.\n * Use `DocumentViewClientProps` instead.\n */\n DocumentViewClientProps as ClientSideEditViewProps,\n DocumentViewClientProps,\n /**\n * @deprecated\n * The `ServerSideEditViewProps` is deprecated and will be removed in the next major version.\n * Use `DocumentViewServerProps` instead.\n */\n DocumentViewServerProps as ServerSideEditViewProps,\n DocumentViewServerProps,\n DocumentViewServerPropsOnly,\n EditViewProps,\n RenderDocumentVersionsProperties,\n} from './views/document.js'\n\nexport type { RelatedDocumentsGrouped } from './views/hierarchyList.js'\n\nexport type {\n AdminViewClientProps,\n /**\n * @deprecated\n * The `AdminViewComponent` type is deprecated and will be removed in the next major version.\n * Type your component props directly instead.\n */\n AdminViewComponent,\n AdminViewConfig,\n /**\n * @deprecated\n * The `AdminViewProps` type is deprecated and will be removed in the next major version.\n * Use `AdminViewServerProps` instead.\n */\n AdminViewServerProps as AdminViewProps,\n AdminViewServerProps,\n AdminViewServerPropsOnly,\n InitPageResult,\n ServerPropsFromView,\n ViewDescriptionClientProps,\n ViewDescriptionServerProps,\n ViewDescriptionServerPropsOnly,\n ViewTypes,\n VisibleEntities,\n} from './views/index.js'\n\nexport type {\n AfterListClientProps,\n AfterListServerProps,\n AfterListServerPropsOnly,\n AfterListTableClientProps,\n AfterListTableServerProps,\n AfterListTableServerPropsOnly,\n BeforeListClientProps,\n BeforeListServerProps,\n BeforeListServerPropsOnly,\n BeforeListTableClientProps,\n BeforeListTableServerProps,\n BeforeListTableServerPropsOnly,\n HierarchyViewData,\n ListViewClientProps,\n ListViewServerProps,\n ListViewServerPropsOnly,\n ListViewSlots,\n ListViewSlotSharedClientProps,\n NoResultsClientProps,\n NoResultsServerProps,\n NoResultsServerPropsOnly,\n} from './views/list.js'\n\ntype SchemaPath = {} & string\nexport type FieldSchemaMap = Map<\n SchemaPath,\n | {\n fields: Field[]\n }\n | Block\n | Field\n | Tab\n>\n\nexport type ClientFieldSchemaMap = Map<\n SchemaPath,\n | {\n fields: ClientField[]\n }\n | ClientBlock\n | ClientField\n | ClientTab\n>\n\nexport type DocumentEvent = {\n doc?: TypeWithID\n drawerSlug?: string\n entitySlug: string\n id?: number | string\n operation: 'create' | 'update'\n updatedAt: string\n}\n"],"names":["Action"],"mappings":"AAmgBA,OAAO,IAAA,AAAKA,gCAAAA;;WAAAA;MAEX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iterateCollections.d.ts","sourceRoot":"","sources":["../../../src/bin/generateImportMap/iterateCollections.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAA;AAClF,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"iterateCollections.d.ts","sourceRoot":"","sources":["../../../src/bin/generateImportMap/iterateCollections.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAA;AAClF,OAAO,KAAK,EAAoB,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAI5E,wBAAgB,kBAAkB,CAAC,EACjC,cAAc,EACd,OAAO,EACP,WAAW,EACX,MAAM,EACN,SAAS,EACT,OAAO,GACR,EAAE;IACD,cAAc,EAAE,cAAc,CAAA;IAC9B,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,yBAAyB,EAAE,CAAA;IACxC,MAAM,EAAE,eAAe,CAAA;IACvB,SAAS,EAAE,iBAAiB,CAAA;IAC5B,OAAO,EAAE,OAAO,CAAA;CACjB,QAgFA"}
|
|
@@ -28,6 +28,16 @@ export function iterateCollections({ addToImportMap, baseDir, collections, confi
|
|
|
28
28
|
if (collection.upload?.admin?.components?.controls) {
|
|
29
29
|
addToImportMap(collection.upload?.admin?.components?.controls);
|
|
30
30
|
}
|
|
31
|
+
const filePreview = collection.upload?.admin?.components?.filePreview;
|
|
32
|
+
if (filePreview) {
|
|
33
|
+
if (typeof filePreview === 'string' || typeof filePreview === 'object' && 'path' in filePreview) {
|
|
34
|
+
addToImportMap(filePreview);
|
|
35
|
+
} else {
|
|
36
|
+
for (const component of Object.values(filePreview)){
|
|
37
|
+
addToImportMap(component);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
31
41
|
if (collection.admin?.components?.views?.edit) {
|
|
32
42
|
for (const editViewConfig of Object.values(collection.admin?.components?.views?.edit)){
|
|
33
43
|
if ('Component' in editViewConfig) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/bin/generateImportMap/iterateCollections.ts"],"sourcesContent":["import type { AdminViewConfig } from '../../admin/views/index.js'\nimport type { SanitizedCollectionConfig } from '../../collections/config/types.js'\nimport type { SanitizedConfig } from '../../config/types.js'\nimport type { AddToImportMap, Imports, InternalImportMap } from './index.js'\n\nimport { genImportMapIterateFields } from './iterateFields.js'\n\nexport function iterateCollections({\n addToImportMap,\n baseDir,\n collections,\n config,\n importMap,\n imports,\n}: {\n addToImportMap: AddToImportMap\n baseDir: string\n collections: SanitizedCollectionConfig[]\n config: SanitizedConfig\n importMap: InternalImportMap\n imports: Imports\n}) {\n for (const collection of collections) {\n genImportMapIterateFields({\n addToImportMap,\n baseDir,\n config,\n fields: collection.fields,\n importMap,\n imports,\n })\n\n addToImportMap(collection.admin?.components?.afterList)\n addToImportMap(collection.admin?.components?.listMenuItems)\n addToImportMap(collection.admin?.components?.afterListTable)\n addToImportMap(collection.admin?.components?.beforeList)\n addToImportMap(collection.admin?.components?.beforeListTable)\n addToImportMap(collection.admin?.components?.Description)\n\n addToImportMap(collection.admin?.components?.edit?.beforeDocumentControls)\n addToImportMap(collection.admin?.components?.edit?.BeforeDocumentMeta)\n addToImportMap(collection.admin?.components?.edit?.editMenuItems)\n addToImportMap(collection.admin?.components?.edit?.PreviewButton)\n addToImportMap(collection.admin?.components?.edit?.PublishButton)\n addToImportMap(collection.admin?.components?.edit?.SaveButton)\n addToImportMap(collection.admin?.components?.edit?.SaveDraftButton)\n addToImportMap(collection.admin?.components?.edit?.Status)\n addToImportMap(collection.admin?.components?.edit?.UnpublishButton)\n addToImportMap(collection.admin?.components?.edit?.Upload)\n\n if (collection.upload?.admin?.components?.controls) {\n addToImportMap(collection.upload?.admin?.components?.controls)\n }\n\n if (collection.admin?.components?.views?.edit) {\n for (const editViewConfig of Object.values(collection.admin?.components?.views?.edit)) {\n if ('Component' in editViewConfig) {\n addToImportMap(editViewConfig?.Component)\n }\n\n if ('actions' in editViewConfig) {\n addToImportMap(editViewConfig?.actions)\n }\n\n if ('tab' in editViewConfig) {\n addToImportMap(editViewConfig?.tab?.Component)\n addToImportMap(editViewConfig?.tab?.Pill)\n }\n }\n }\n\n addToImportMap(collection.admin?.components?.views?.list?.Component)\n addToImportMap(collection.admin?.components?.views?.list?.actions)\n addToImportMap(collection.admin?.components?.views?.list?.NoResults)\n\n // Register custom collection view components (any key other than 'edit' and 'list')\n if (collection.admin?.components?.views) {\n for (const [key, view] of Object.entries(collection.admin.components.views)) {\n if (key === 'edit' || key === 'list') {\n continue\n }\n if (view && typeof view === 'object' && 'Component' in view && 'path' in view) {\n addToImportMap((view as AdminViewConfig).Component)\n }\n }\n }\n }\n}\n"],"names":["genImportMapIterateFields","iterateCollections","addToImportMap","baseDir","collections","config","importMap","imports","collection","fields","admin","components","afterList","listMenuItems","afterListTable","beforeList","beforeListTable","Description","edit","beforeDocumentControls","BeforeDocumentMeta","editMenuItems","PreviewButton","PublishButton","SaveButton","SaveDraftButton","Status","UnpublishButton","Upload","upload","controls","
|
|
1
|
+
{"version":3,"sources":["../../../src/bin/generateImportMap/iterateCollections.ts"],"sourcesContent":["import type { AdminViewConfig } from '../../admin/views/index.js'\nimport type { SanitizedCollectionConfig } from '../../collections/config/types.js'\nimport type { PayloadComponent, SanitizedConfig } from '../../config/types.js'\nimport type { AddToImportMap, Imports, InternalImportMap } from './index.js'\n\nimport { genImportMapIterateFields } from './iterateFields.js'\n\nexport function iterateCollections({\n addToImportMap,\n baseDir,\n collections,\n config,\n importMap,\n imports,\n}: {\n addToImportMap: AddToImportMap\n baseDir: string\n collections: SanitizedCollectionConfig[]\n config: SanitizedConfig\n importMap: InternalImportMap\n imports: Imports\n}) {\n for (const collection of collections) {\n genImportMapIterateFields({\n addToImportMap,\n baseDir,\n config,\n fields: collection.fields,\n importMap,\n imports,\n })\n\n addToImportMap(collection.admin?.components?.afterList)\n addToImportMap(collection.admin?.components?.listMenuItems)\n addToImportMap(collection.admin?.components?.afterListTable)\n addToImportMap(collection.admin?.components?.beforeList)\n addToImportMap(collection.admin?.components?.beforeListTable)\n addToImportMap(collection.admin?.components?.Description)\n\n addToImportMap(collection.admin?.components?.edit?.beforeDocumentControls)\n addToImportMap(collection.admin?.components?.edit?.BeforeDocumentMeta)\n addToImportMap(collection.admin?.components?.edit?.editMenuItems)\n addToImportMap(collection.admin?.components?.edit?.PreviewButton)\n addToImportMap(collection.admin?.components?.edit?.PublishButton)\n addToImportMap(collection.admin?.components?.edit?.SaveButton)\n addToImportMap(collection.admin?.components?.edit?.SaveDraftButton)\n addToImportMap(collection.admin?.components?.edit?.Status)\n addToImportMap(collection.admin?.components?.edit?.UnpublishButton)\n addToImportMap(collection.admin?.components?.edit?.Upload)\n\n if (collection.upload?.admin?.components?.controls) {\n addToImportMap(collection.upload?.admin?.components?.controls)\n }\n\n const filePreview = collection.upload?.admin?.components?.filePreview\n if (filePreview) {\n if (\n typeof filePreview === 'string' ||\n (typeof filePreview === 'object' && 'path' in filePreview)\n ) {\n addToImportMap(filePreview as PayloadComponent)\n } else {\n for (const component of Object.values(filePreview as Record<string, PayloadComponent>)) {\n addToImportMap(component)\n }\n }\n }\n\n if (collection.admin?.components?.views?.edit) {\n for (const editViewConfig of Object.values(collection.admin?.components?.views?.edit)) {\n if ('Component' in editViewConfig) {\n addToImportMap(editViewConfig?.Component)\n }\n\n if ('actions' in editViewConfig) {\n addToImportMap(editViewConfig?.actions)\n }\n\n if ('tab' in editViewConfig) {\n addToImportMap(editViewConfig?.tab?.Component)\n addToImportMap(editViewConfig?.tab?.Pill)\n }\n }\n }\n\n addToImportMap(collection.admin?.components?.views?.list?.Component)\n addToImportMap(collection.admin?.components?.views?.list?.actions)\n addToImportMap(collection.admin?.components?.views?.list?.NoResults)\n\n // Register custom collection view components (any key other than 'edit' and 'list')\n if (collection.admin?.components?.views) {\n for (const [key, view] of Object.entries(collection.admin.components.views)) {\n if (key === 'edit' || key === 'list') {\n continue\n }\n if (view && typeof view === 'object' && 'Component' in view && 'path' in view) {\n addToImportMap((view as AdminViewConfig).Component)\n }\n }\n }\n }\n}\n"],"names":["genImportMapIterateFields","iterateCollections","addToImportMap","baseDir","collections","config","importMap","imports","collection","fields","admin","components","afterList","listMenuItems","afterListTable","beforeList","beforeListTable","Description","edit","beforeDocumentControls","BeforeDocumentMeta","editMenuItems","PreviewButton","PublishButton","SaveButton","SaveDraftButton","Status","UnpublishButton","Upload","upload","controls","filePreview","component","Object","values","views","editViewConfig","Component","actions","tab","Pill","list","NoResults","key","view","entries"],"mappings":"AAKA,SAASA,yBAAyB,QAAQ,qBAAoB;AAE9D,OAAO,SAASC,mBAAmB,EACjCC,cAAc,EACdC,OAAO,EACPC,WAAW,EACXC,MAAM,EACNC,SAAS,EACTC,OAAO,EAQR;IACC,KAAK,MAAMC,cAAcJ,YAAa;QACpCJ,0BAA0B;YACxBE;YACAC;YACAE;YACAI,QAAQD,WAAWC,MAAM;YACzBH;YACAC;QACF;QAEAL,eAAeM,WAAWE,KAAK,EAAEC,YAAYC;QAC7CV,eAAeM,WAAWE,KAAK,EAAEC,YAAYE;QAC7CX,eAAeM,WAAWE,KAAK,EAAEC,YAAYG;QAC7CZ,eAAeM,WAAWE,KAAK,EAAEC,YAAYI;QAC7Cb,eAAeM,WAAWE,K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C;gBAEA,IAAI,SAASF,gBAAgB;oBAC3BlC,eAAekC,gBAAgBG,KAAKF;oBACpCnC,eAAekC,gBAAgBG,KAAKC;gBACtC;YACF;QACF;QAEAtC,eAAeM,WAAWE,KAAK,EAAEC,YAAYwB,OAAOM,MAAMJ;QAC1DnC,eAAeM,WAAWE,KAAK,EAAEC,YAAYwB,OAAOM,MAAMH;QAC1DpC,eAAeM,WAAWE,KAAK,EAAEC,YAAYwB,OAAOM,MAAMC;QAE1D,oFAAoF;QACpF,IAAIlC,WAAWE,KAAK,EAAEC,YAAYwB,OAAO;YACvC,KAAK,MAAM,CAACQ,KAAKC,KAAK,IAAIX,OAAOY,OAAO,CAACrC,WAAWE,KAAK,CAACC,UAAU,CAACwB,KAAK,EAAG;gBAC3E,IAAIQ,QAAQ,UAAUA,QAAQ,QAAQ;oBACpC;gBACF;gBACA,IAAIC,QAAQ,OAAOA,SAAS,YAAY,eAAeA,QAAQ,UAAUA,MAAM;oBAC7E1C,eAAe,AAAC0C,KAAyBP,SAAS;gBACpD;YACF;QACF;IACF;AACF"}
|
|
@@ -8,7 +8,7 @@ import type { Payload } from '../../types/index.js';
|
|
|
8
8
|
import type { SanitizedCollectionConfig } from './types.js';
|
|
9
9
|
export type ServerOnlyCollectionProperties = keyof Pick<SanitizedCollectionConfig, 'access' | 'custom' | 'endpoints' | 'flattenedFields' | 'hooks' | 'indexes' | 'joins' | 'polymorphicJoins' | 'sanitizedIndexes' | 'select'>;
|
|
10
10
|
export type ServerOnlyCollectionAdminProperties = keyof Pick<SanitizedCollectionConfig['admin'], 'baseFilter' | 'baseListFilter' | 'components' | 'formatDocURL' | 'hidden'>;
|
|
11
|
-
export type ServerOnlyUploadProperties = keyof Pick<SanitizedCollectionConfig['upload'], 'adminThumbnail' | 'externalFileHeaderFilter' | 'handlers' | 'modifyResponseHeaders' | 'withMetadata'>;
|
|
11
|
+
export type ServerOnlyUploadProperties = keyof Pick<SanitizedCollectionConfig['upload'], 'admin' | 'adminThumbnail' | 'externalFileHeaderFilter' | 'handlers' | 'modifyResponseHeaders' | 'withMetadata'>;
|
|
12
12
|
export type ClientCollectionConfig = {
|
|
13
13
|
admin: {
|
|
14
14
|
description?: StaticDescription;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/collections/config/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAa,MAAM,0BAA0B,CAAA;AAErE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AACrE,OAAO,KAAK,EACV,iBAAiB,EACjB,+BAA+B,EAC/B,WAAW,EACZ,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAChE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AACrE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAEnD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAA;AAI3D,MAAM,MAAM,8BAA8B,GAAG,MAAM,IAAI,CACrD,yBAAyB,EACvB,QAAQ,GACR,QAAQ,GACR,WAAW,GACX,iBAAiB,GACjB,OAAO,GACP,SAAS,GACT,OAAO,GACP,kBAAkB,GAClB,kBAAkB,GAClB,QAAQ,CACX,CAAA;AAED,MAAM,MAAM,mCAAmC,GAAG,MAAM,IAAI,CAC1D,yBAAyB,CAAC,OAAO,CAAC,EAClC,YAAY,GAAG,gBAAgB,GAAG,YAAY,GAAG,cAAc,GAAG,QAAQ,CAC3E,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG,MAAM,IAAI,CACjD,yBAAyB,CAAC,QAAQ,CAAC,EACjC,gBAAgB,GAChB,0BAA0B,GAC1B,UAAU,GACV,uBAAuB,GACvB,cAAc,CACjB,CAAA;A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AA;IACzC,MAAM,EAAE;QACN,MAAM,EAAE,WAAW,CAAA;QACnB,QAAQ,EAAE,WAAW,CAAA;KACtB,CAAA;CACF,GAAG,IAAI,CACN,yBAAyB,EACzB,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,WAAW,GAAG,QAAQ,GAAG,8BAA8B,CACtF,CAAA;AAqCD,eAAO,MAAM,4BAA4B,GAAI,iDAK1C;IACD,UAAU,EAAE,yBAAyB,CAAA;IACrC,aAAa,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,eAAe,CAAC,CAAA;IACvD,IAAI,EAAE,UAAU,CAAA;IAChB,SAAS,EAAE,SAAS,CAAA;CACrB,KAAG,sBA0LH,CAAA;AAED,eAAO,MAAM,6BAA6B,GAAI,kDAK3C;IACD,WAAW,EAAE,yBAAyB,EAAE,CAAA;IACxC,aAAa,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,eAAe,CAAC,CAAA;IACvD,IAAI,EAAE,UAAU,CAAA;IAChB,SAAS,EAAE,SAAS,CAAA;CACrB,KAAG,sBAAsB,EAezB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/collections/config/client.ts"],"sourcesContent":["import type { I18nClient, TFunction } from '@payloadcms/translations'\n\nimport type { StaticDescription } from '../../admin/types.js'\nimport type { ImportMap } from '../../bin/generateImportMap/index.js'\nimport type {\n LivePreviewConfig,\n ServerOnlyLivePreviewProperties,\n StaticLabel,\n} from '../../config/types.js'\nimport type { ClientField } from '../../fields/config/client.js'\nimport type { ClientHierarchyConfig } from '../../hierarchy/types.js'\nimport type { Payload } from '../../types/index.js'\nimport type { SanitizedUploadConfig } from '../../uploads/types.js'\nimport type { SanitizedCollectionConfig } from './types.js'\n\nimport { createClientFields } from '../../fields/config/client.js'\n\nexport type ServerOnlyCollectionProperties = keyof Pick<\n SanitizedCollectionConfig,\n | 'access'\n | 'custom'\n | 'endpoints'\n | 'flattenedFields'\n | 'hooks'\n | 'indexes'\n | 'joins'\n | 'polymorphicJoins'\n | 'sanitizedIndexes'\n | 'select'\n>\n\nexport type ServerOnlyCollectionAdminProperties = keyof Pick<\n SanitizedCollectionConfig['admin'],\n 'baseFilter' | 'baseListFilter' | 'components' | 'formatDocURL' | 'hidden'\n>\n\nexport type ServerOnlyUploadProperties = keyof Pick<\n SanitizedCollectionConfig['upload'],\n | 'adminThumbnail'\n | 'externalFileHeaderFilter'\n | 'handlers'\n | 'modifyResponseHeaders'\n | 'withMetadata'\n>\n\nexport type ClientCollectionConfig = {\n admin: {\n description?: StaticDescription\n livePreview?: Omit<LivePreviewConfig, ServerOnlyLivePreviewProperties>\n preview?: boolean\n } & Omit<\n SanitizedCollectionConfig['admin'],\n | 'components'\n | 'description'\n | 'formatDocURL'\n | 'joins'\n | 'livePreview'\n | 'preview'\n | ServerOnlyCollectionAdminProperties\n >\n auth?: { verify?: true } & Omit<\n SanitizedCollectionConfig['auth'],\n 'forgotPassword' | 'strategies' | 'verify'\n >\n fields: ClientField[]\n hierarchy?: ClientHierarchyConfig | false\n labels: {\n plural: StaticLabel\n singular: StaticLabel\n }\n} & Omit<\n SanitizedCollectionConfig,\n 'admin' | 'auth' | 'fields' | 'hierarchy' | 'labels' | ServerOnlyCollectionProperties\n>\n\nconst serverOnlyCollectionProperties: Partial<ServerOnlyCollectionProperties>[] = [\n 'hooks',\n 'access',\n 'endpoints',\n 'custom',\n 'joins',\n 'polymorphicJoins',\n 'flattenedFields',\n 'indexes',\n 'sanitizedIndexes',\n 'select',\n // `upload`\n // `admin`\n // are all handled separately\n]\n\nconst serverOnlyUploadProperties: Partial<ServerOnlyUploadProperties>[] = [\n 'adminThumbnail',\n 'externalFileHeaderFilter',\n 'handlers',\n 'modifyResponseHeaders',\n 'withMetadata',\n]\n\nconst serverOnlyCollectionAdminProperties: Partial<ServerOnlyCollectionAdminProperties>[] = [\n 'hidden',\n 'baseFilter',\n 'baseListFilter',\n 'components',\n 'formatDocURL',\n // 'preview' is handled separately\n // `livePreview` is handled separately\n]\n\nexport const createClientCollectionConfig = ({\n collection,\n defaultIDType,\n i18n,\n importMap,\n}: {\n collection: SanitizedCollectionConfig\n defaultIDType: Payload['config']['db']['defaultIDType']\n i18n: I18nClient\n importMap: ImportMap\n}): ClientCollectionConfig => {\n const clientCollection = {} as Partial<ClientCollectionConfig>\n\n for (const key in collection) {\n if (serverOnlyCollectionProperties.includes(key as any)) {\n continue\n }\n switch (key) {\n case 'admin':\n if (!collection.admin) {\n break\n }\n\n clientCollection.admin = {} as ClientCollectionConfig['admin']\n\n for (const adminKey in collection.admin) {\n if (serverOnlyCollectionAdminProperties.includes(adminKey as any)) {\n continue\n }\n\n switch (adminKey) {\n case 'description':\n if (\n typeof collection.admin.description === 'string' ||\n typeof collection.admin.description === 'object'\n ) {\n if (collection.admin.description) {\n clientCollection.admin.description = collection.admin.description\n }\n } else if (typeof collection.admin.description === 'function') {\n const description = collection.admin.description({ t: i18n.t as TFunction })\n\n if (description) {\n clientCollection.admin.description = description\n }\n }\n break\n\n case 'livePreview':\n clientCollection.admin.livePreview = {}\n\n if (collection.admin.livePreview?.breakpoints) {\n clientCollection.admin.livePreview.breakpoints =\n collection.admin.livePreview.breakpoints\n }\n\n break\n\n case 'preview':\n if (collection.admin.preview) {\n clientCollection.admin.preview = true\n }\n\n break\n\n default:\n ;(clientCollection as any).admin[adminKey] =\n collection.admin[adminKey as keyof SanitizedCollectionConfig['admin']]\n }\n }\n\n break\n\n case 'auth':\n if (!collection.auth) {\n break\n }\n\n clientCollection.auth = {} as { verify?: true } & SanitizedCollectionConfig['auth']\n\n if (collection.auth.cookies) {\n clientCollection.auth.cookies = collection.auth.cookies\n }\n\n if (collection.auth.depth !== undefined) {\n // Check for undefined as it can be a number (0)\n clientCollection.auth.depth = collection.auth.depth\n }\n\n if (collection.auth.disableLocalStrategy) {\n clientCollection.auth.disableLocalStrategy = collection.auth.disableLocalStrategy\n }\n\n if (collection.auth.lockTime !== undefined) {\n // Check for undefined as it can be a number (0)\n clientCollection.auth.lockTime = collection.auth.lockTime\n }\n\n if (collection.auth.loginWithUsername) {\n clientCollection.auth.loginWithUsername = collection.auth.loginWithUsername\n }\n\n if (collection.auth.maxLoginAttempts !== undefined) {\n // Check for undefined as it can be a number (0)\n clientCollection.auth.maxLoginAttempts = collection.auth.maxLoginAttempts\n }\n\n if (collection.auth.removeTokenFromResponses) {\n clientCollection.auth.removeTokenFromResponses = collection.auth.removeTokenFromResponses\n }\n\n if (collection.auth.useAPIKey) {\n clientCollection.auth.useAPIKey = collection.auth.useAPIKey\n }\n\n if (collection.auth.tokenExpiration) {\n clientCollection.auth.tokenExpiration = collection.auth.tokenExpiration\n }\n\n if (collection.auth.verify) {\n clientCollection.auth.verify = true\n }\n\n break\n\n case 'fields':\n clientCollection.fields = createClientFields({\n defaultIDType,\n fields: collection.fields,\n i18n,\n importMap,\n })\n\n break\n\n case 'hierarchy': {\n if (!collection.hierarchy || typeof collection.hierarchy !== 'object') {\n clientCollection.hierarchy = false\n break\n }\n\n // Strip slugify function as it can't cross server-client boundary\n const { slugify: _slugify, ...clientHierarchy } = collection.hierarchy\n clientCollection.hierarchy = clientHierarchy as ClientHierarchyConfig\n\n break\n }\n\n case 'labels':\n clientCollection.labels = {\n plural:\n typeof collection.labels.plural === 'function'\n ? collection.labels.plural({ i18n, t: i18n.t as TFunction })\n : collection.labels.plural,\n singular:\n typeof collection.labels.singular === 'function'\n ? collection.labels.singular({ i18n, t: i18n.t as TFunction })\n : collection.labels.singular,\n }\n\n break\n\n case 'upload':\n if (!collection.upload) {\n break\n }\n\n clientCollection.upload = {} as SanitizedUploadConfig\n\n for (const uploadKey in collection.upload) {\n if (serverOnlyUploadProperties.includes(uploadKey as any)) {\n continue\n }\n\n if (uploadKey === 'imageSizes') {\n clientCollection.upload.imageSizes = collection.upload.imageSizes?.map((size) => {\n const sanitizedSize = { ...size }\n if ('generateImageName' in sanitizedSize) {\n delete sanitizedSize.generateImageName\n }\n return sanitizedSize\n })\n } else {\n ;(clientCollection.upload as any)[uploadKey] =\n collection.upload[uploadKey as keyof SanitizedUploadConfig]\n }\n }\n\n break\n\n default:\n ;(clientCollection as any)[key] = collection[key as keyof SanitizedCollectionConfig]\n }\n }\n\n return clientCollection as ClientCollectionConfig\n}\n\nexport const createClientCollectionConfigs = ({\n collections,\n defaultIDType,\n i18n,\n importMap,\n}: {\n collections: SanitizedCollectionConfig[]\n defaultIDType: Payload['config']['db']['defaultIDType']\n i18n: I18nClient\n importMap: ImportMap\n}): ClientCollectionConfig[] => {\n const clientCollections = new Array(collections.length)\n\n for (let i = 0; i < collections.length; i++) {\n const collection = collections[i]!\n\n clientCollections[i] = createClientCollectionConfig({\n collection,\n defaultIDType,\n i18n,\n importMap,\n })\n }\n\n return clientCollections\n}\n"],"names":["createClientFields","serverOnlyCollectionProperties","serverOnlyUploadProperties","serverOnlyCollectionAdminProperties","createClientCollectionConfig","collection","defaultIDType","i18n","importMap","clientCollection","key","includes","admin","adminKey","description","t","livePreview","breakpoints","preview","auth","cookies","depth","undefined","disableLocalStrategy","lockTime","loginWithUsername","maxLoginAttempts","removeTokenFromResponses","useAPIKey","tokenExpiration","verify","fields","hierarchy","slugify","_slugify","clientHierarchy","labels","plural","singular","upload","uploadKey","imageSizes","map","size","sanitizedSize","generateImageName","createClientCollectionConfigs","collections","clientCollections","Array","length","i"],"mappings":"AAeA,SAASA,kBAAkB,QAAQ,gCAA+B;AA4DlE,MAAMC,iCAA4E;IAChF;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CAID;AAED,MAAMC,6BAAoE;IACxE;IACA;IACA;IACA;IACA;CACD;AAED,MAAMC,sCAAsF;IAC1F;IACA;IACA;IACA;IACA;CAGD;AAED,OAAO,MAAMC,+BAA+B,CAAC,EAC3CC,UAAU,EACVC,aAAa,EACbC,IAAI,EACJC,SAAS,EAMV;IACC,MAAMC,mBAAmB,CAAC;IAE1B,IAAK,MAAMC,OA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AAc,cAAc;wBAC9B/B,iBAAiB8B,MAAM,CAACE,UAAU,GAAGpC,WAAWkC,MAAM,CAACE,UAAU,EAAEC,IAAI,CAACC;4BACtE,MAAMC,gBAAgB;gCAAE,GAAGD,IAAI;4BAAC;4BAChC,IAAI,uBAAuBC,eAAe;gCACxC,OAAOA,cAAcC,iBAAiB;4BACxC;4BACA,OAAOD;wBACT;oBACF,OAAO;;wBACHnC,iBAAiB8B,MAAM,AAAQ,CAACC,UAAU,GAC1CnC,WAAWkC,MAAM,CAACC,UAAyC;oBAC/D;gBACF;gBAEA;YAEF;;gBACI/B,gBAAwB,CAACC,IAAI,GAAGL,UAAU,CAACK,IAAuC;QACxF;IACF;IAEA,OAAOD;AACT,EAAC;AAED,OAAO,MAAMqC,gCAAgC,CAAC,EAC5CC,WAAW,EACXzC,aAAa,EACbC,IAAI,EACJC,SAAS,EAMV;IACC,MAAMwC,oBAAoB,IAAIC,MAAMF,YAAYG,MAAM;IAEtD,IAAK,IAAIC,IAAI,GAAGA,IAAIJ,YAAYG,MAAM,EAAEC,IAAK;QAC3C,MAAM9C,aAAa0C,WAAW,CAACI,EAAE;QAEjCH,iBAAiB,CAACG,EAAE,GAAG/C,6BAA6B;YAClDC;YACAC;YACAC;YACAC;QACF;IACF;IAEA,OAAOwC;AACT,EAAC"}
|
|
1
|
+
{"version":3,"sources":["../../../src/collections/config/client.ts"],"sourcesContent":["import type { I18nClient, TFunction } from '@payloadcms/translations'\n\nimport type { StaticDescription } from '../../admin/types.js'\nimport type { ImportMap } from '../../bin/generateImportMap/index.js'\nimport type {\n LivePreviewConfig,\n ServerOnlyLivePreviewProperties,\n StaticLabel,\n} from '../../config/types.js'\nimport type { ClientField } from '../../fields/config/client.js'\nimport type { ClientHierarchyConfig } from '../../hierarchy/types.js'\nimport type { Payload } from '../../types/index.js'\nimport type { SanitizedUploadConfig } from '../../uploads/types.js'\nimport type { SanitizedCollectionConfig } from './types.js'\n\nimport { createClientFields } from '../../fields/config/client.js'\n\nexport type ServerOnlyCollectionProperties = keyof Pick<\n SanitizedCollectionConfig,\n | 'access'\n | 'custom'\n | 'endpoints'\n | 'flattenedFields'\n | 'hooks'\n | 'indexes'\n | 'joins'\n | 'polymorphicJoins'\n | 'sanitizedIndexes'\n | 'select'\n>\n\nexport type ServerOnlyCollectionAdminProperties = keyof Pick<\n SanitizedCollectionConfig['admin'],\n 'baseFilter' | 'baseListFilter' | 'components' | 'formatDocURL' | 'hidden'\n>\n\nexport type ServerOnlyUploadProperties = keyof Pick<\n SanitizedCollectionConfig['upload'],\n | 'admin'\n | 'adminThumbnail'\n | 'externalFileHeaderFilter'\n | 'handlers'\n | 'modifyResponseHeaders'\n | 'withMetadata'\n>\n\nexport type ClientCollectionConfig = {\n admin: {\n description?: StaticDescription\n livePreview?: Omit<LivePreviewConfig, ServerOnlyLivePreviewProperties>\n preview?: boolean\n } & Omit<\n SanitizedCollectionConfig['admin'],\n | 'components'\n | 'description'\n | 'formatDocURL'\n | 'joins'\n | 'livePreview'\n | 'preview'\n | ServerOnlyCollectionAdminProperties\n >\n auth?: { verify?: true } & Omit<\n SanitizedCollectionConfig['auth'],\n 'forgotPassword' | 'strategies' | 'verify'\n >\n fields: ClientField[]\n hierarchy?: ClientHierarchyConfig | false\n labels: {\n plural: StaticLabel\n singular: StaticLabel\n }\n} & Omit<\n SanitizedCollectionConfig,\n 'admin' | 'auth' | 'fields' | 'hierarchy' | 'labels' | ServerOnlyCollectionProperties\n>\n\nconst serverOnlyCollectionProperties: Partial<ServerOnlyCollectionProperties>[] = [\n 'hooks',\n 'access',\n 'endpoints',\n 'custom',\n 'joins',\n 'polymorphicJoins',\n 'flattenedFields',\n 'indexes',\n 'sanitizedIndexes',\n 'select',\n // `upload`\n // `admin`\n // are all handled separately\n]\n\nconst serverOnlyUploadProperties: Partial<ServerOnlyUploadProperties>[] = [\n 'admin',\n 'adminThumbnail',\n 'externalFileHeaderFilter',\n 'handlers',\n 'modifyResponseHeaders',\n 'withMetadata',\n]\n\nconst serverOnlyCollectionAdminProperties: Partial<ServerOnlyCollectionAdminProperties>[] = [\n 'hidden',\n 'baseFilter',\n 'baseListFilter',\n 'components',\n 'formatDocURL',\n // 'preview' is handled separately\n // `livePreview` is handled separately\n]\n\nexport const createClientCollectionConfig = ({\n collection,\n defaultIDType,\n i18n,\n importMap,\n}: {\n collection: SanitizedCollectionConfig\n defaultIDType: Payload['config']['db']['defaultIDType']\n i18n: I18nClient\n importMap: ImportMap\n}): ClientCollectionConfig => {\n const clientCollection = {} as Partial<ClientCollectionConfig>\n\n for (const key in collection) {\n if (serverOnlyCollectionProperties.includes(key as any)) {\n continue\n }\n switch (key) {\n case 'admin':\n if (!collection.admin) {\n break\n }\n\n clientCollection.admin = {} as ClientCollectionConfig['admin']\n\n for (const adminKey in collection.admin) {\n if (serverOnlyCollectionAdminProperties.includes(adminKey as any)) {\n continue\n }\n\n switch (adminKey) {\n case 'description':\n if (\n typeof collection.admin.description === 'string' ||\n typeof collection.admin.description === 'object'\n ) {\n if (collection.admin.description) {\n clientCollection.admin.description = collection.admin.description\n }\n } else if (typeof collection.admin.description === 'function') {\n const description = collection.admin.description({ t: i18n.t as TFunction })\n\n if (description) {\n clientCollection.admin.description = description\n }\n }\n break\n\n case 'livePreview':\n clientCollection.admin.livePreview = {}\n\n if (collection.admin.livePreview?.breakpoints) {\n clientCollection.admin.livePreview.breakpoints =\n collection.admin.livePreview.breakpoints\n }\n\n break\n\n case 'preview':\n if (collection.admin.preview) {\n clientCollection.admin.preview = true\n }\n\n break\n\n default:\n ;(clientCollection as any).admin[adminKey] =\n collection.admin[adminKey as keyof SanitizedCollectionConfig['admin']]\n }\n }\n\n break\n\n case 'auth':\n if (!collection.auth) {\n break\n }\n\n clientCollection.auth = {} as { verify?: true } & SanitizedCollectionConfig['auth']\n\n if (collection.auth.cookies) {\n clientCollection.auth.cookies = collection.auth.cookies\n }\n\n if (collection.auth.depth !== undefined) {\n // Check for undefined as it can be a number (0)\n clientCollection.auth.depth = collection.auth.depth\n }\n\n if (collection.auth.disableLocalStrategy) {\n clientCollection.auth.disableLocalStrategy = collection.auth.disableLocalStrategy\n }\n\n if (collection.auth.lockTime !== undefined) {\n // Check for undefined as it can be a number (0)\n clientCollection.auth.lockTime = collection.auth.lockTime\n }\n\n if (collection.auth.loginWithUsername) {\n clientCollection.auth.loginWithUsername = collection.auth.loginWithUsername\n }\n\n if (collection.auth.maxLoginAttempts !== undefined) {\n // Check for undefined as it can be a number (0)\n clientCollection.auth.maxLoginAttempts = collection.auth.maxLoginAttempts\n }\n\n if (collection.auth.removeTokenFromResponses) {\n clientCollection.auth.removeTokenFromResponses = collection.auth.removeTokenFromResponses\n }\n\n if (collection.auth.useAPIKey) {\n clientCollection.auth.useAPIKey = collection.auth.useAPIKey\n }\n\n if (collection.auth.tokenExpiration) {\n clientCollection.auth.tokenExpiration = collection.auth.tokenExpiration\n }\n\n if (collection.auth.verify) {\n clientCollection.auth.verify = true\n }\n\n break\n\n case 'fields':\n clientCollection.fields = createClientFields({\n defaultIDType,\n fields: collection.fields,\n i18n,\n importMap,\n })\n\n break\n\n case 'hierarchy': {\n if (!collection.hierarchy || typeof collection.hierarchy !== 'object') {\n clientCollection.hierarchy = false\n break\n }\n\n // Strip slugify function as it can't cross server-client boundary\n const { slugify: _slugify, ...clientHierarchy } = collection.hierarchy\n clientCollection.hierarchy = clientHierarchy as ClientHierarchyConfig\n\n break\n }\n\n case 'labels':\n clientCollection.labels = {\n plural:\n typeof collection.labels.plural === 'function'\n ? collection.labels.plural({ i18n, t: i18n.t as TFunction })\n : collection.labels.plural,\n singular:\n typeof collection.labels.singular === 'function'\n ? collection.labels.singular({ i18n, t: i18n.t as TFunction })\n : collection.labels.singular,\n }\n\n break\n\n case 'upload':\n if (!collection.upload) {\n break\n }\n\n clientCollection.upload = {} as SanitizedUploadConfig\n\n for (const uploadKey in collection.upload) {\n if (serverOnlyUploadProperties.includes(uploadKey as any)) {\n continue\n }\n\n if (uploadKey === 'imageSizes') {\n clientCollection.upload.imageSizes = collection.upload.imageSizes?.map((size) => {\n const sanitizedSize = { ...size }\n if ('generateImageName' in sanitizedSize) {\n delete sanitizedSize.generateImageName\n }\n return sanitizedSize\n })\n } else {\n ;(clientCollection.upload as any)[uploadKey] =\n collection.upload[uploadKey as keyof SanitizedUploadConfig]\n }\n }\n\n break\n\n default:\n ;(clientCollection as any)[key] = collection[key as keyof SanitizedCollectionConfig]\n }\n }\n\n return clientCollection as ClientCollectionConfig\n}\n\nexport const createClientCollectionConfigs = ({\n collections,\n defaultIDType,\n i18n,\n importMap,\n}: {\n collections: SanitizedCollectionConfig[]\n defaultIDType: Payload['config']['db']['defaultIDType']\n i18n: I18nClient\n importMap: ImportMap\n}): ClientCollectionConfig[] => {\n const clientCollections = new Array(collections.length)\n\n for (let i = 0; i < collections.length; i++) {\n const collection = collections[i]!\n\n clientCollections[i] = createClientCollectionConfig({\n collection,\n defaultIDType,\n i18n,\n importMap,\n })\n }\n\n return clientCollections\n}\n"],"names":["createClientFields","serverOnlyCollectionProperties","serverOnlyUploadProperties","serverOnlyCollectionAdminProperties","createClientCollectionConfig","collection","defaultIDType","i18n","importMap","clientCollection","key","includes","admin","adminKey","description","t","livePreview","breakpoints","preview","auth","cookies","depth","undefined","disableLocalStrategy","lockTime","loginWithUsername","maxLoginAttempts","removeTokenFromResponses","useAPIKey","tokenExpiration","verify","fields","hierarchy","slugify","_slugify","clientHierarchy","labels","plural","singular","upload","uploadKey","imageSizes","map","size","sanitizedSize","generateImageName","createClientCollectionConfigs","collections","clientCollections","Array","length","i"],"mappings":"AAeA,SAASA,kBAAkB,QAAQ,gCAA+B;AA6DlE,MAAMC,iCAA4E;IAChF;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CAID;AAED,MAAMC,6BAAoE;IACxE;IACA;IACA;IACA;IACA;IACA;CACD;AAED,MAAMC,sCAAsF;IAC1F;IACA;IACA;IACA;IACA;CAGD;AAED,OAAO,MAAMC,+BAA+B,CAAC,EAC3C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C,WAAWkC,MAAM,CAAE;oBACzC,IAAIrC,2BAA2BS,QAAQ,CAAC6B,YAAmB;wBACzD;oBACF;oBAEA,IAAIA,cAAc,cAAc;wBAC9B/B,iBAAiB8B,MAAM,CAACE,UAAU,GAAGpC,WAAWkC,MAAM,CAACE,UAAU,EAAEC,IAAI,CAACC;4BACtE,MAAMC,gBAAgB;gCAAE,GAAGD,IAAI;4BAAC;4BAChC,IAAI,uBAAuBC,eAAe;gCACxC,OAAOA,cAAcC,iBAAiB;4BACxC;4BACA,OAAOD;wBACT;oBACF,OAAO;;wBACHnC,iBAAiB8B,MAAM,AAAQ,CAACC,UAAU,GAC1CnC,WAAWkC,MAAM,CAACC,UAAyC;oBAC/D;gBACF;gBAEA;YAEF;;gBACI/B,gBAAwB,CAACC,IAAI,GAAGL,UAAU,CAACK,IAAuC;QACxF;IACF;IAEA,OAAOD;AACT,EAAC;AAED,OAAO,MAAMqC,gCAAgC,CAAC,EAC5CC,WAAW,EACXzC,aAAa,EACbC,IAAI,EACJC,SAAS,EAMV;IACC,MAAMwC,oBAAoB,IAAIC,MAAMF,YAAYG,MAAM;IAEtD,IAAK,IAAIC,IAAI,GAAGA,IAAIJ,YAAYG,MAAM,EAAEC,IAAK;QAC3C,MAAM9C,aAAa0C,WAAW,CAACI,EAAE;QAEjCH,iBAAiB,CAACG,EAAE,GAAG/C,6BAA6B;YAClDC;YACAC;YACAC;YACAC;QACF;IACF;IAEA,OAAOwC;AACT,EAAC"}
|
package/dist/exports/shared.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export { PREFERENCE_KEYS } from '../preferences/keys.js';
|
|
|
20
20
|
export { validOperators, validOperatorSet } from '../types/constants.js';
|
|
21
21
|
export { formatFilesize } from '../uploads/formatFilesize.js';
|
|
22
22
|
export { isImage } from '../uploads/isImage.js';
|
|
23
|
+
export { matchMimeType } from '../uploads/matchMimeType.js';
|
|
23
24
|
export { appendDateTimezoneSelectFields } from '../utilities/appendDateTimezoneSelectFields.js';
|
|
24
25
|
export { appendUploadSelectFields } from '../utilities/appendUploadSelectFields.js';
|
|
25
26
|
export { applyLocaleFiltering } from '../utilities/applyLocaleFiltering.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/exports/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAExD,OAAO,EACL,cAAc,EACd,4BAA4B,EAC5B,qBAAqB,EACrB,mBAAmB,EACnB,YAAY,GACb,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,wDAAwD,CAAA;AACzF,OAAO,EAAE,qBAAqB,EAAE,MAAM,6DAA6D,CAAA;AACnG,OAAO,EAAE,QAAQ,IAAI,kBAAkB,EAAE,MAAM,mCAAmC,CAAA;AAElF,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,4CAA4C,CAAA;AAEnD,OAAO,EAAE,uBAAuB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAEzE,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAEjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mDAAmD,CAAA;AAEpF,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,SAAS,EACT,gBAAgB,EAChB,yBAAyB,EACzB,cAAc,EACd,cAAc,EACd,sBAAsB,EACtB,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,wBAAwB,GACzB,MAAM,2BAA2B,CAAA;AAElC,OAAO,EAAE,aAA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,yCAAyC,CAAA;AAEhD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAA;AAE3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AAEnE,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAEzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAA;AAEnF,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEjD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAEzD,OAAO,EACL,6BAA6B,EAC7B,8BAA8B,GAC/B,MAAM,4CAA4C,CAAA;AAEnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAA;AACvE,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAA"}
|
package/dist/exports/shared.js
CHANGED
|
@@ -17,6 +17,7 @@ export { PREFERENCE_KEYS } from '../preferences/keys.js';
|
|
|
17
17
|
export { validOperators, validOperatorSet } from '../types/constants.js';
|
|
18
18
|
export { formatFilesize } from '../uploads/formatFilesize.js';
|
|
19
19
|
export { isImage } from '../uploads/isImage.js';
|
|
20
|
+
export { matchMimeType } from '../uploads/matchMimeType.js';
|
|
20
21
|
export { appendDateTimezoneSelectFields } from '../utilities/appendDateTimezoneSelectFields.js';
|
|
21
22
|
export { appendUploadSelectFields } from '../utilities/appendUploadSelectFields.js';
|
|
22
23
|
export { applyLocaleFiltering } from '../utilities/applyLocaleFiltering.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/exports/shared.ts"],"sourcesContent":["export { EntityType } from '../admin/views/dashboard.js'\n\nexport {\n generateCookie,\n generateExpiredPayloadCookie,\n generatePayloadCookie,\n getCookieExpiration,\n parseCookies,\n} from '../auth/cookies.js'\nexport { getLoginOptions } from '../auth/getLoginOptions.js'\nexport { addSessionToUser, removeExpiredSessions } from '../auth/sessions.js'\nexport { getFromImportMap } from '../bin/generateImportMap/utilities/getFromImportMap.js'\nexport { parsePayloadComponent } from '../bin/generateImportMap/utilities/parsePayloadComponent.js'\nexport { defaults as collectionDefaults } from '../collections/config/defaults.js'\n\nexport {\n BASE_36_DIGITS,\n generateKeyBetween,\n generateNKeysBetween,\n} from '../config/orderable/fractional-indexing.js'\n\nexport { isUserMenuSettingsGroup, serverProps } from '../config/types.js'\n\nexport { type Slugify } from '../fields/baseFields/slug/index.js'\n\nexport { defaultTimezones } from '../fields/baseFields/timezone/defaultTimezones.js'\n\nexport {\n fieldAffectsData,\n fieldHasMaxDepth,\n fieldHasSubFields,\n fieldIsArrayType,\n fieldIsBlockType,\n fieldIsGroupType,\n fieldIsHiddenOrDisabled,\n fieldIsID,\n fieldIsLocalized,\n fieldIsPresentationalOnly,\n fieldIsSidebar,\n fieldIsVirtual,\n fieldShouldBeLocalized,\n fieldSupportsMany,\n groupHasName,\n optionIsObject,\n optionIsValue,\n optionsAreObjects,\n tabHasName,\n valueIsValueWithRelation,\n} from '../fields/config/types.js'\n\nexport { getFieldPaths } from '../fields/getFieldPaths.js'\nexport { isFieldDisabled } from '../fields/isFieldDisabled.js'\nexport type { DisabledArea, DisabledOptions } from '../fields/isFieldDisabled.js'\nexport * from '../fields/validations.js'\nexport {\n DEFAULT_HIERARCHY_LIST_LIMIT,\n DEFAULT_HIERARCHY_TREE_LIMIT,\n getHierarchyFieldName,\n} from '../hierarchy/constants.js'\n\nexport type { ClientHierarchyConfig, FolderBreadcrumb } from '../hierarchy/types.js'\n\nexport { PREFERENCE_KEYS } from '../preferences/keys.js'\n\nexport { validOperators, validOperatorSet } from '../types/constants.js'\n\nexport { formatFilesize } from '../uploads/formatFilesize.js'\nexport { isImage } from '../uploads/isImage.js'\nexport { appendDateTimezoneSelectFields } from '../utilities/appendDateTimezoneSelectFields.js'\nexport { appendUploadSelectFields } from '../utilities/appendUploadSelectFields.js'\nexport { applyLocaleFiltering } from '../utilities/applyLocaleFiltering.js'\n\nexport { combineWhereConstraints } from '../utilities/combineWhereConstraints.js'\n\nexport {\n deepCopyObject,\n deepCopyObjectComplex,\n deepCopyObjectSimple,\n deepCopyObjectSimpleWithoutReactComponents,\n} from '../utilities/deepCopyObject.js'\nexport {\n deepMerge,\n deepMergeWithCombinedArrays,\n deepMergeWithReactComponents,\n deepMergeWithSourceArrays,\n} from '../utilities/deepMerge.js'\n\nexport { extractID } from '../utilities/extractID.js'\n\nexport { flattenAllFields } from '../utilities/flattenAllFields.js'\nexport { flattenTopLevelFields } from '../utilities/flattenTopLevelFields.js'\nexport { formatAdminURL } from '../utilities/formatAdminURL.js'\nexport { formatLabels, toWords } from '../utilities/formatLabels.js'\n\nexport { getBestFitFromSizes } from '../utilities/getBestFitFromSizes.js'\nexport { getDataByPath } from '../utilities/getDataByPath.js'\nexport { getFieldPermissions } from '../utilities/getFieldPermissions.js'\nexport { getObjectDotNotation } from '../utilities/getObjectDotNotation.js'\n\nexport { getSafeRedirect } from '../utilities/getSafeRedirect.js'\n\nexport { getSelectMode } from '../utilities/getSelectMode.js'\n\nexport { getSiblingData } from '../utilities/getSiblingData.js'\n\nexport { getUniqueListBy } from '../utilities/getUniqueListBy.js'\n\nexport {\n getAutosaveInterval,\n getVersionsMax,\n hasAutosaveEnabled,\n hasDraftsEnabled,\n hasDraftValidationEnabled,\n hasLocalizeStatusEnabled,\n hasScheduledPublishEnabled,\n} from '../utilities/getVersionsConfig.js'\n\nexport { isNextBuild } from '../utilities/isNextBuild.js'\n\nexport { isNumber } from '../utilities/isNumber.js'\n\nexport { isPlainObject } from '../utilities/isPlainObject.js'\n\nexport {\n isReactClientComponent,\n isReactComponentOrFunction,\n isReactServerComponentOrFunction,\n} from '../utilities/isReactComponent.js'\n\nexport {\n hoistQueryParamsToAnd,\n mergeListSearchAndWhere,\n} from '../utilities/mergeListSearchAndWhere.js'\n\nexport { reduceFieldsToValues } from '../utilities/reduceFieldsToValues.js'\n\nexport { sanitizeFilename } from '../utilities/sanitizeFilename.js'\n\nexport { sanitizeUrl } from '../utilities/sanitizeUrl.js'\n\nexport { sanitizeUserDataForEmail } from '../utilities/sanitizeUserDataForEmail.js'\n\nexport { setsAreEqual } from '../utilities/setsAreEqual.js'\n\nexport { slugify } from '../utilities/slugify.js'\n\nexport { toKebabCase } from '../utilities/toKebabCase.js'\n\nexport {\n transformColumnsToPreferences,\n transformColumnsToSearchParams,\n} from '../utilities/transformColumnPreferences.js'\n\nexport { transformWhereQuery } from '../utilities/transformWhereQuery.js'\nexport { unflatten } from '../utilities/unflatten.js'\nexport { validateMimeType } from '../utilities/validateMimeType.js'\nexport { validateWhereQuery } from '../utilities/validateWhereQuery.js'\nexport { wait } from '../utilities/wait.js'\nexport { wordBoundariesRegex } from '../utilities/wordBoundariesRegex.js'\nexport { versionDefaults } from '../versions/defaults.js'\n\nexport { deepMergeSimple } from '@payloadcms/translations/utilities'\n"],"names":["EntityType","generateCookie","generateExpiredPayloadCookie","generatePayloadCookie","getCookieExpiration","parseCookies","getLoginOptions","addSessionToUser","removeExpiredSessions","getFromImportMap","parsePayloadComponent","defaults","collectionDefaults","BASE_36_DIGITS","generateKeyBetween","generateNKeysBetween","isUserMenuSettingsGroup","serverProps","defaultTimezones","fieldAffectsData","fieldHasMaxDepth","fieldHasSubFields","fieldIsArrayType","fieldIsBlockType","fieldIsGroupType","fieldIsHiddenOrDisabled","fieldIsID","fieldIsLocalized","fieldIsPresentationalOnly","fieldIsSidebar","fieldIsVirtual","fieldShouldBeLocalized","fieldSupportsMany","groupHasName","optionIsObject","optionIsValue","optionsAreObjects","tabHasName","valueIsValueWithRelation","getFieldPaths","isFieldDisabled","DEFAULT_HIERARCHY_LIST_LIMIT","DEFAULT_HIERARCHY_TREE_LIMIT","getHierarchyFieldName","PREFERENCE_KEYS","validOperators","validOperatorSet","formatFilesize","isImage","appendDateTimezoneSelectFields","appendUploadSelectFields","applyLocaleFiltering","combineWhereConstraints","deepCopyObject","deepCopyObjectComplex","deepCopyObjectSimple","deepCopyObjectSimpleWithoutReactComponents","deepMerge","deepMergeWithCombinedArrays","deepMergeWithReactComponents","deepMergeWithSourceArrays","extractID","flattenAllFields","flattenTopLevelFields","formatAdminURL","formatLabels","toWords","getBestFitFromSizes","getDataByPath","getFieldPermissions","getObjectDotNotation","getSafeRedirect","getSelectMode","getSiblingData","getUniqueListBy","getAutosaveInterval","getVersionsMax","hasAutosaveEnabled","hasDraftsEnabled","hasDraftValidationEnabled","hasLocalizeStatusEnabled","hasScheduledPublishEnabled","isNextBuild","isNumber","isPlainObject","isReactClientComponent","isReactComponentOrFunction","isReactServerComponentOrFunction","hoistQueryParamsToAnd","mergeListSearchAndWhere","reduceFieldsToValues","sanitizeFilename","sanitizeUrl","sanitizeUserDataForEmail","setsAreEqual","slugify","toKebabCase","transformColumnsToPreferences","transformColumnsToSearchParams","transformWhereQuery","unflatten","validateMimeType","validateWhereQuery","wait","wordBoundariesRegex","versionDefaults","deepMergeSimple"],"mappings":"AAAA,SAASA,UAAU,QAAQ,8BAA6B;AAExD,SACEC,cAAc,EACdC,4BAA4B,EAC5BC,qBAAqB,EACrBC,mBAAmB,EACnBC,YAAY,QACP,qBAAoB;AAC3B,SAASC,eAAe,QAAQ,6BAA4B;AAC5D,SAASC,gBAAgB,EAAEC,qBAAqB,QAAQ,sBAAqB;AAC7E,SAASC,gBAAgB,QAAQ,yDAAwD;AACzF,SAASC,qBAAqB,QAAQ,8DAA6D;AACnG,SAASC,YAAY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e,QAAQ,0BAAyB;AAEzD,SAASC,eAAe,QAAQ,qCAAoC"}
|
|
1
|
+
{"version":3,"sources":["../../src/exports/shared.ts"],"sourcesContent":["export { EntityType } from '../admin/views/dashboard.js'\n\nexport {\n generateCookie,\n generateExpiredPayloadCookie,\n generatePayloadCookie,\n getCookieExpiration,\n parseCookies,\n} from '../auth/cookies.js'\nexport { getLoginOptions } from '../auth/getLoginOptions.js'\nexport { addSessionToUser, removeExpiredSessions } from '../auth/sessions.js'\nexport { getFromImportMap } from '../bin/generateImportMap/utilities/getFromImportMap.js'\nexport { parsePayloadComponent } from '../bin/generateImportMap/utilities/parsePayloadComponent.js'\nexport { defaults as collectionDefaults } from '../collections/config/defaults.js'\n\nexport {\n BASE_36_DIGITS,\n generateKeyBetween,\n generateNKeysBetween,\n} from '../config/orderable/fractional-indexing.js'\n\nexport { isUserMenuSettingsGroup, serverProps } from '../config/types.js'\n\nexport { type Slugify } from '../fields/baseFields/slug/index.js'\n\nexport { defaultTimezones } from '../fields/baseFields/timezone/defaultTimezones.js'\n\nexport {\n fieldAffectsData,\n fieldHasMaxDepth,\n fieldHasSubFields,\n fieldIsArrayType,\n fieldIsBlockType,\n fieldIsGroupType,\n fieldIsHiddenOrDisabled,\n fieldIsID,\n fieldIsLocalized,\n fieldIsPresentationalOnly,\n fieldIsSidebar,\n fieldIsVirtual,\n fieldShouldBeLocalized,\n fieldSupportsMany,\n groupHasName,\n optionIsObject,\n optionIsValue,\n optionsAreObjects,\n tabHasName,\n valueIsValueWithRelation,\n} from '../fields/config/types.js'\n\nexport { getFieldPaths } from '../fields/getFieldPaths.js'\nexport { isFieldDisabled } from '../fields/isFieldDisabled.js'\nexport type { DisabledArea, DisabledOptions } from '../fields/isFieldDisabled.js'\nexport * from '../fields/validations.js'\nexport {\n DEFAULT_HIERARCHY_LIST_LIMIT,\n DEFAULT_HIERARCHY_TREE_LIMIT,\n getHierarchyFieldName,\n} from '../hierarchy/constants.js'\n\nexport type { ClientHierarchyConfig, FolderBreadcrumb } from '../hierarchy/types.js'\n\nexport { PREFERENCE_KEYS } from '../preferences/keys.js'\n\nexport { validOperators, validOperatorSet } from '../types/constants.js'\n\nexport { formatFilesize } from '../uploads/formatFilesize.js'\nexport { isImage } from '../uploads/isImage.js'\nexport { matchMimeType } from '../uploads/matchMimeType.js'\nexport { appendDateTimezoneSelectFields } from '../utilities/appendDateTimezoneSelectFields.js'\nexport { appendUploadSelectFields } from '../utilities/appendUploadSelectFields.js'\nexport { applyLocaleFiltering } from '../utilities/applyLocaleFiltering.js'\n\nexport { combineWhereConstraints } from '../utilities/combineWhereConstraints.js'\n\nexport {\n deepCopyObject,\n deepCopyObjectComplex,\n deepCopyObjectSimple,\n deepCopyObjectSimpleWithoutReactComponents,\n} from '../utilities/deepCopyObject.js'\nexport {\n deepMerge,\n deepMergeWithCombinedArrays,\n deepMergeWithReactComponents,\n deepMergeWithSourceArrays,\n} from '../utilities/deepMerge.js'\n\nexport { extractID } from '../utilities/extractID.js'\n\nexport { flattenAllFields } from '../utilities/flattenAllFields.js'\nexport { flattenTopLevelFields } from '../utilities/flattenTopLevelFields.js'\nexport { formatAdminURL } from '../utilities/formatAdminURL.js'\nexport { formatLabels, toWords } from '../utilities/formatLabels.js'\n\nexport { getBestFitFromSizes } from '../utilities/getBestFitFromSizes.js'\nexport { getDataByPath } from '../utilities/getDataByPath.js'\nexport { getFieldPermissions } from '../utilities/getFieldPermissions.js'\nexport { getObjectDotNotation } from '../utilities/getObjectDotNotation.js'\n\nexport { getSafeRedirect } from '../utilities/getSafeRedirect.js'\n\nexport { getSelectMode } from '../utilities/getSelectMode.js'\n\nexport { getSiblingData } from '../utilities/getSiblingData.js'\n\nexport { getUniqueListBy } from '../utilities/getUniqueListBy.js'\n\nexport {\n getAutosaveInterval,\n getVersionsMax,\n hasAutosaveEnabled,\n hasDraftsEnabled,\n hasDraftValidationEnabled,\n hasLocalizeStatusEnabled,\n hasScheduledPublishEnabled,\n} from '../utilities/getVersionsConfig.js'\n\nexport { isNextBuild } from '../utilities/isNextBuild.js'\n\nexport { isNumber } from '../utilities/isNumber.js'\n\nexport { isPlainObject } from '../utilities/isPlainObject.js'\n\nexport {\n isReactClientComponent,\n isReactComponentOrFunction,\n isReactServerComponentOrFunction,\n} from '../utilities/isReactComponent.js'\n\nexport {\n hoistQueryParamsToAnd,\n mergeListSearchAndWhere,\n} from '../utilities/mergeListSearchAndWhere.js'\n\nexport { reduceFieldsToValues } from '../utilities/reduceFieldsToValues.js'\n\nexport { sanitizeFilename } from '../utilities/sanitizeFilename.js'\n\nexport { sanitizeUrl } from '../utilities/sanitizeUrl.js'\n\nexport { sanitizeUserDataForEmail } from '../utilities/sanitizeUserDataForEmail.js'\n\nexport { setsAreEqual } from '../utilities/setsAreEqual.js'\n\nexport { slugify } from '../utilities/slugify.js'\n\nexport { toKebabCase } from '../utilities/toKebabCase.js'\n\nexport {\n transformColumnsToPreferences,\n transformColumnsToSearchParams,\n} from '../utilities/transformColumnPreferences.js'\n\nexport { transformWhereQuery } from '../utilities/transformWhereQuery.js'\nexport { unflatten } from '../utilities/unflatten.js'\nexport { validateMimeType } from '../utilities/validateMimeType.js'\nexport { validateWhereQuery } from '../utilities/validateWhereQuery.js'\nexport { wait } from '../utilities/wait.js'\nexport { wordBoundariesRegex } from '../utilities/wordBoundariesRegex.js'\nexport { versionDefaults } from '../versions/defaults.js'\n\nexport { deepMergeSimple } from '@payloadcms/translations/utilities'\n"],"names":["EntityType","generateCookie","generateExpiredPayloadCookie","generatePayloadCookie","getCookieExpiration","parseCookies","getLoginOptions","addSessionToUser","removeExpiredSessions","getFromImportMap","parsePayloadComponent","defaults","collectionDefaults","BASE_36_DIGITS","generateKeyBetween","generateNKeysBetween","isUserMenuSettingsGroup","serverProps","defaultTimezones","fieldAffectsData","fieldHasMaxDepth","fieldHasSubFields","fieldIsArrayType","fieldIsBlockType","fieldIsGroupType","fieldIsHiddenOrDisabled","fieldIsID","fieldIsLocalized","fieldIsPresentationalOnly","fieldIsSidebar","fieldIsVirtual","fieldShouldBeLocalized","fieldSupportsMany","groupHasName","optionIsObject","optionIsValue","optionsAreObjects","tabHasName","valueIsValueWithRelation","getFieldPaths","isFieldDisabled","DEFAULT_HIERARCHY_LIST_LIMIT","DEFAULT_HIERARCHY_TREE_LIMIT","getHierarchyFieldName","PREFERENCE_KEYS","validOperators","validOperatorSet","formatFilesize","isImage","matchMimeType","appendDateTimezoneSelectFields","appendUploadSelectFields","applyLocaleFiltering","combineWhereConstraints","deepCopyObject","deepCopyObjectComplex","deepCopyObjectSimple","deepCopyObjectSimpleWithoutReactComponents","deepMerge","deepMergeWithCombinedArrays","deepMergeWithReactComponents","deepMergeWithSourceArrays","extractID","flattenAllFields","flattenTopLevelFields","formatAdminURL","formatLabels","toWords","getBestFitFromSizes","getDataByPath","getFieldPermissions","getObjectDotNotation","getSafeRedirect","getSelectMode","getSiblingData","getUniqueListBy","getAutosaveInterval","getVersionsMax","hasAutosaveEnabled","hasDraftsEnabled","hasDraftValidationEnabled","hasLocalizeStatusEnabled","hasScheduledPublishEnabled","isNextBuild","isNumber","isPlainObject","isReactClientComponent","isReactComponentOrFunction","isReactServerComponentOrFunction","hoistQueryParamsToAnd","mergeListSearchAndWhere","reduceFieldsToValues","sanitizeFilename","sanitizeUrl","sanitizeUserDataForEmail","setsAreEqual","slugify","toKebabCase","transformColumnsToPreferences","transformColumnsToSearchParams","transformWhereQuery","unflatten","validateMimeType","validateWhereQuery","wait","wordBoundariesRegex","versionDefaults","deepMergeSimple"],"mappings":"AAAA,SAASA,UAAU,QAAQ,8BAA6B;AAExD,SACEC,cAAc,EACdC,4BAA4B,EAC5BC,qBAAqB,EACrBC,mBAAmB,EACnBC,YAAY,QACP,qBAAoB;AAC3B,SAASC,eAAe,QAAQ,6BAA4B;AAC5D,SAASC,gBAAgB,EAAEC,qBAAqB,QAAQ,sBAAqB;AAC7E,SAASC,gBAAgB,QAAQ,yDAAwD;AACzF,SAASC,qBAAqB,QAAQ,8DAA6D;A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