chore: slate upload ssr
BIN
media/image-1.png
Normal file
|
After Width: | Height: | Size: 88 KiB |
BIN
media/image-2.png
Normal file
|
After Width: | Height: | Size: 88 KiB |
BIN
media/image-3.png
Normal file
|
After Width: | Height: | Size: 88 KiB |
BIN
media/image-4.png
Normal file
|
After Width: | Height: | Size: 88 KiB |
BIN
media/image-5.png
Normal file
|
After Width: | Height: | Size: 88 KiB |
BIN
media/image-6.png
Normal file
|
After Width: | Height: | Size: 88 KiB |
BIN
media/image-7.png
Normal file
|
After Width: | Height: | Size: 88 KiB |
BIN
media/image-8.png
Normal file
|
After Width: | Height: | Size: 88 KiB |
BIN
media/image.png
Normal file
|
After Width: | Height: | Size: 88 KiB |
@@ -58,6 +58,8 @@ const sanitizeCollections = (
|
||||
delete sanitized.access
|
||||
delete sanitized.endpoints
|
||||
|
||||
if ('editor' in sanitized) delete sanitized.editor
|
||||
|
||||
if ('admin' in sanitized) {
|
||||
sanitized.admin = { ...sanitized.admin }
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import ol from './ol'
|
||||
// import relationship from './relationship'
|
||||
// import textAlign from './textAlign'
|
||||
import ul from './ul'
|
||||
// import upload from './upload'
|
||||
import upload from './upload'
|
||||
|
||||
const elements: Record<string, RichTextCustomElement> = {
|
||||
blockquote,
|
||||
@@ -31,7 +31,7 @@ const elements: Record<string, RichTextCustomElement> = {
|
||||
// relationship,
|
||||
// textAlign,
|
||||
ul,
|
||||
// upload,
|
||||
upload,
|
||||
}
|
||||
|
||||
export default elements
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
'use client'
|
||||
|
||||
import type { FormState } from '@payloadcms/ui'
|
||||
|
||||
import { useModal } from '@faceless-ui/modal'
|
||||
import { getTranslation } from '@payloadcms/translations'
|
||||
import {
|
||||
Button,
|
||||
FormState,
|
||||
Popup,
|
||||
Translation,
|
||||
getFormState,
|
||||
@@ -21,11 +22,13 @@ import React, { useCallback, useEffect, useState } from 'react'
|
||||
import { Editor, Node, Transforms } from 'slate'
|
||||
import { ReactEditor, useSlate } from 'slate-react'
|
||||
|
||||
import type { LinkElementType } from '../types'
|
||||
|
||||
import { useElement } from '../../../providers/ElementProvider'
|
||||
import { LinkDrawer } from '../LinkDrawer'
|
||||
import { linkFieldsSchemaPath } from '../shared'
|
||||
import { unwrapLink } from '../utilities'
|
||||
import './index.scss'
|
||||
import { LinkElementType } from '../types'
|
||||
|
||||
const baseClass = 'rich-text-link'
|
||||
|
||||
@@ -58,10 +61,10 @@ export const LinkElement = () => {
|
||||
const { attributes, children, editorRef, element, fieldProps, schemaPath } =
|
||||
useElement<LinkElementType>()
|
||||
|
||||
const linkFieldsSchemaPath = `${schemaPath}.link.fields`
|
||||
const fieldMapPath = `${schemaPath}.${linkFieldsSchemaPath}`
|
||||
|
||||
const { richTextComponentMap } = fieldProps
|
||||
const fieldMap = richTextComponentMap.get(linkFieldsSchemaPath)
|
||||
const fieldMap = richTextComponentMap.get(fieldMapPath)
|
||||
|
||||
const editor = useSlate()
|
||||
const config = useConfig()
|
||||
@@ -102,7 +105,7 @@ export const LinkElement = () => {
|
||||
data,
|
||||
docPreferences,
|
||||
operation: 'update',
|
||||
schemaPath: linkFieldsSchemaPath,
|
||||
schemaPath: fieldMapPath,
|
||||
},
|
||||
serverURL: config.serverURL,
|
||||
})
|
||||
@@ -111,7 +114,7 @@ export const LinkElement = () => {
|
||||
}
|
||||
|
||||
awaitInitialState()
|
||||
}, [renderModal, element, user, locale, t, getDocPreferences, config])
|
||||
}, [renderModal, element, user, locale, t, getDocPreferences, config, id, fieldMapPath])
|
||||
|
||||
return (
|
||||
<span className={baseClass} {...attributes}>
|
||||
|
||||
@@ -42,9 +42,9 @@ const UploadButton: React.FC<ButtonProps> = ({ enabledCollectionSlugs }) => {
|
||||
})
|
||||
|
||||
const onSelect = useCallback(
|
||||
({ collectionConfig, docID }) => {
|
||||
({ collectionSlug, docID }) => {
|
||||
insertUpload(editor, {
|
||||
relationTo: collectionConfig.slug,
|
||||
relationTo: collectionSlug,
|
||||
value: {
|
||||
id: docID,
|
||||
},
|
||||
|
||||
@@ -9,49 +9,50 @@ import {
|
||||
Form,
|
||||
FormSubmit,
|
||||
RenderFields,
|
||||
buildStateFromSchema,
|
||||
fieldTypes,
|
||||
getFormState,
|
||||
useAuth,
|
||||
useConfig,
|
||||
useDocumentInfo,
|
||||
useLocale,
|
||||
useTranslation,
|
||||
} from '@payloadcms/ui'
|
||||
import { sanitizeFields } from 'payload/config'
|
||||
import { deepCopyObject } from 'payload/utilities'
|
||||
import React, { useCallback, useEffect, useState } from 'react'
|
||||
import { Transforms } from 'slate'
|
||||
import { ReactEditor, useSlateStatic } from 'slate-react'
|
||||
|
||||
import type { ElementProps } from '..'
|
||||
import type { FormFieldBase } from '../../../../../../../ui/src/forms/fields/shared'
|
||||
import type { UploadElementType } from '../../types'
|
||||
|
||||
export const UploadDrawer: React.FC<
|
||||
ElementProps & {
|
||||
import { FieldPathProvider } from '../../../../../../../ui/src/forms/FieldPathProvider'
|
||||
import { uploadFieldsSchemaPath } from '../../shared'
|
||||
|
||||
export const UploadDrawer: React.FC<{
|
||||
drawerSlug: string
|
||||
relatedCollection: SanitizedCollectionConfig
|
||||
element: UploadElementType
|
||||
fieldProps: FormFieldBase & {
|
||||
name: string
|
||||
richTextComponentMap: Map<string, React.ReactNode>
|
||||
}
|
||||
> = (props) => {
|
||||
relatedCollection: SanitizedCollectionConfig
|
||||
schemaPath: string
|
||||
}> = (props) => {
|
||||
const editor = useSlateStatic()
|
||||
|
||||
const { drawerSlug, element, fieldProps, relatedCollection } = props
|
||||
const { drawerSlug, element, fieldProps, relatedCollection, schemaPath } = props
|
||||
|
||||
const { i18n, t } = useTranslation()
|
||||
const { code: locale } = useLocale()
|
||||
const { user } = useAuth()
|
||||
const { closeModal } = useModal()
|
||||
const { getDocPreferences } = useDocumentInfo()
|
||||
const { id, getDocPreferences } = useDocumentInfo()
|
||||
const [initialState, setInitialState] = useState({})
|
||||
const fieldSchemaUnsanitized =
|
||||
fieldProps?.admin?.upload?.collections?.[relatedCollection.slug]?.fields
|
||||
const config = useConfig()
|
||||
const { richTextComponentMap } = fieldProps
|
||||
|
||||
// Sanitize custom fields here
|
||||
const validRelationships = config.collections.map((c) => c.slug) || []
|
||||
const fieldSchema = sanitizeFields({
|
||||
config: config,
|
||||
fields: fieldSchemaUnsanitized,
|
||||
validRelationships,
|
||||
})
|
||||
const relatedFieldSchemaPath = `${uploadFieldsSchemaPath}.${relatedCollection.slug}`
|
||||
const fieldMap = richTextComponentMap.get(relatedFieldSchemaPath)
|
||||
|
||||
const config = useConfig()
|
||||
|
||||
const handleUpdateEditData = useCallback(
|
||||
(_, data) => {
|
||||
@@ -68,31 +69,38 @@ export const UploadDrawer: React.FC<
|
||||
)
|
||||
|
||||
useEffect(() => {
|
||||
// Sanitize custom fields here
|
||||
const validRelationships = config.collections.map((c) => c.slug) || []
|
||||
const fieldSchema = sanitizeFields({
|
||||
config: config,
|
||||
fields: fieldSchemaUnsanitized,
|
||||
validRelationships,
|
||||
})
|
||||
const data = deepCopyObject(element?.fields || {})
|
||||
|
||||
const awaitInitialState = async () => {
|
||||
const preferences = await getDocPreferences()
|
||||
const state = await buildStateFromSchema({
|
||||
config,
|
||||
data: deepCopyObject(element?.fields || {}),
|
||||
fieldSchema,
|
||||
locale,
|
||||
const docPreferences = await getDocPreferences()
|
||||
|
||||
const state = await getFormState({
|
||||
apiRoute: config.routes.api,
|
||||
body: {
|
||||
id,
|
||||
data,
|
||||
docPreferences,
|
||||
operation: 'update',
|
||||
preferences,
|
||||
t,
|
||||
user,
|
||||
schemaPath: `${schemaPath}.${uploadFieldsSchemaPath}.${relatedCollection.slug}`,
|
||||
},
|
||||
serverURL: config.serverURL,
|
||||
})
|
||||
|
||||
setInitialState(state)
|
||||
}
|
||||
|
||||
awaitInitialState()
|
||||
}, [fieldSchemaUnsanitized, config, element.fields, user, locale, t, getDocPreferences])
|
||||
}, [
|
||||
config,
|
||||
element?.fields,
|
||||
user,
|
||||
locale,
|
||||
t,
|
||||
getDocPreferences,
|
||||
id,
|
||||
schemaPath,
|
||||
relatedCollection.slug,
|
||||
])
|
||||
|
||||
return (
|
||||
<Drawer
|
||||
@@ -101,10 +109,12 @@ export const UploadDrawer: React.FC<
|
||||
label: getTranslation(relatedCollection.labels.singular, i18n),
|
||||
})}
|
||||
>
|
||||
<FieldPathProvider path="" schemaPath="">
|
||||
<Form initialState={initialState} onSubmit={handleUpdateEditData}>
|
||||
<RenderFields fieldSchema={fieldSchema} fieldTypes={fieldTypes} readOnly={false} />
|
||||
<RenderFields fieldMap={Array.isArray(fieldMap) ? fieldMap : []} />
|
||||
<FormSubmit>{t('fields:saveChanges')}</FormSubmit>
|
||||
</Form>
|
||||
</FieldPathProvider>
|
||||
</Drawer>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
'use client'
|
||||
|
||||
import type { SanitizedCollectionConfig } from 'payload/types'
|
||||
import type { HTMLAttributes } from 'react'
|
||||
|
||||
import { getTranslation } from '@payloadcms/translations'
|
||||
import {
|
||||
@@ -20,9 +19,12 @@ import React, { useCallback, useReducer, useState } from 'react'
|
||||
import { Transforms } from 'slate'
|
||||
import { ReactEditor, useFocused, useSelected, useSlateStatic } from 'slate-react'
|
||||
|
||||
import type { FieldProps } from '../../../../types'
|
||||
import type { FormFieldBase } from '../../../../../../ui/src/forms/fields/shared'
|
||||
import type { UploadElementType } from '../types'
|
||||
|
||||
import { useElement } from '../../../providers/ElementProvider'
|
||||
import { EnabledRelationshipsCondition } from '../../EnabledRelationshipsCondition'
|
||||
import { uploadFieldsSchemaPath, uploadName } from '../shared'
|
||||
import { UploadDrawer } from './UploadDrawer'
|
||||
import './index.scss'
|
||||
|
||||
@@ -32,23 +34,22 @@ const initialParams = {
|
||||
depth: 0,
|
||||
}
|
||||
|
||||
export type ElementProps = {
|
||||
attributes: HTMLAttributes<HTMLDivElement>
|
||||
children: React.ReactNode
|
||||
element: any
|
||||
enabledCollectionSlugs: string[]
|
||||
fieldProps: FieldProps
|
||||
type Props = FormFieldBase & {
|
||||
name: string
|
||||
richTextComponentMap: Map<string, React.ReactNode>
|
||||
}
|
||||
|
||||
const Element: React.FC<ElementProps> = (props) => {
|
||||
const Element: React.FC<Props & { enabledCollectionSlugs?: string[] }> = ({
|
||||
enabledCollectionSlugs,
|
||||
}) => {
|
||||
const {
|
||||
attributes,
|
||||
children,
|
||||
element: { relationTo, value },
|
||||
element,
|
||||
enabledCollectionSlugs,
|
||||
fieldProps,
|
||||
} = props
|
||||
schemaPath,
|
||||
} = useElement<UploadElementType>()
|
||||
|
||||
const {
|
||||
collections,
|
||||
@@ -83,7 +84,7 @@ const Element: React.FC<ElementProps> = (props) => {
|
||||
{ initialParams },
|
||||
)
|
||||
|
||||
const thumbnailSRC = useThumbnail(relatedCollection, data)
|
||||
const thumbnailSRC = useThumbnail(relatedCollection.upload, data)
|
||||
|
||||
const removeUpload = useCallback(() => {
|
||||
const elementPath = ReactEditor.findPath(editor, element)
|
||||
@@ -103,8 +104,6 @@ const Element: React.FC<ElementProps> = (props) => {
|
||||
|
||||
Transforms.setNodes(editor, newNode, { at: elementPath })
|
||||
|
||||
// setRelatedCollection(collections.find((coll) => coll.slug === collectionConfig.slug));
|
||||
|
||||
setParams({
|
||||
...initialParams,
|
||||
cacheBust, // do this to get the usePayloadAPI to re-fetch the data even though the URL string hasn't changed
|
||||
@@ -117,17 +116,17 @@ const Element: React.FC<ElementProps> = (props) => {
|
||||
)
|
||||
|
||||
const swapUpload = React.useCallback(
|
||||
({ collectionConfig, docID }) => {
|
||||
({ collectionSlug, docID }) => {
|
||||
const newNode = {
|
||||
children: [{ text: ' ' }],
|
||||
relationTo: collectionConfig.slug,
|
||||
type: 'upload',
|
||||
relationTo: collectionSlug,
|
||||
type: uploadName,
|
||||
value: { id: docID },
|
||||
}
|
||||
|
||||
const elementPath = ReactEditor.findPath(editor, element)
|
||||
|
||||
setRelatedCollection(collections.find((coll) => coll.slug === collectionConfig.slug))
|
||||
setRelatedCollection(collections.find((coll) => coll.slug === collectionSlug))
|
||||
|
||||
Transforms.setNodes(editor, newNode, { at: elementPath })
|
||||
|
||||
@@ -137,7 +136,8 @@ const Element: React.FC<ElementProps> = (props) => {
|
||||
[closeListDrawer, editor, element, collections],
|
||||
)
|
||||
|
||||
const customFields = fieldProps?.admin?.upload?.collections?.[relatedCollection.slug]?.fields
|
||||
const relatedFieldSchemaPath = `${uploadFieldsSchemaPath}.${relatedCollection.slug}`
|
||||
const customFieldsMap = fieldProps.richTextComponentMap.get(relatedFieldSchemaPath)
|
||||
|
||||
return (
|
||||
<div
|
||||
@@ -157,10 +157,10 @@ const Element: React.FC<ElementProps> = (props) => {
|
||||
{getTranslation(relatedCollection.labels.singular, i18n)}
|
||||
</div>
|
||||
<div className={`${baseClass}__actions`}>
|
||||
{customFields?.length > 0 && (
|
||||
{Boolean(customFieldsMap) && (
|
||||
<DrawerToggler
|
||||
className={`${baseClass}__upload-drawer-toggler`}
|
||||
disabled={fieldProps?.admin?.readOnly}
|
||||
disabled={fieldProps?.readOnly}
|
||||
slug={drawerSlug}
|
||||
>
|
||||
<Button
|
||||
@@ -177,11 +177,11 @@ const Element: React.FC<ElementProps> = (props) => {
|
||||
)}
|
||||
<ListDrawerToggler
|
||||
className={`${baseClass}__list-drawer-toggler`}
|
||||
disabled={fieldProps?.admin?.readOnly}
|
||||
disabled={fieldProps?.readOnly}
|
||||
>
|
||||
<Button
|
||||
buttonStyle="icon-label"
|
||||
disabled={fieldProps?.admin?.readOnly}
|
||||
disabled={fieldProps?.readOnly}
|
||||
el="div"
|
||||
icon="swap"
|
||||
onClick={() => {
|
||||
@@ -194,7 +194,7 @@ const Element: React.FC<ElementProps> = (props) => {
|
||||
<Button
|
||||
buttonStyle="icon-label"
|
||||
className={`${baseClass}__removeButton`}
|
||||
disabled={fieldProps?.admin?.readOnly}
|
||||
disabled={fieldProps?.readOnly}
|
||||
icon="x"
|
||||
onClick={(e) => {
|
||||
e.preventDefault()
|
||||
@@ -215,12 +215,12 @@ const Element: React.FC<ElementProps> = (props) => {
|
||||
{children}
|
||||
{value?.id && <DocumentDrawer onSave={updateUpload} />}
|
||||
<ListDrawer onSelect={swapUpload} />
|
||||
<UploadDrawer drawerSlug={drawerSlug} relatedCollection={relatedCollection} {...props} />
|
||||
<UploadDrawer {...{ drawerSlug, element, fieldProps, relatedCollection, schemaPath }} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default (props: ElementProps): React.ReactNode => {
|
||||
export default (props: Props): React.ReactNode => {
|
||||
return (
|
||||
<EnabledRelationshipsCondition {...props} uploads>
|
||||
<Element {...props} />
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
import type { RichTextCustomElement } from '../../..'
|
||||
|
||||
import Button from './Button'
|
||||
import Element from './Element'
|
||||
import plugin from './plugin'
|
||||
import { WithUpload } from './plugin'
|
||||
import { uploadName } from './shared'
|
||||
|
||||
export default {
|
||||
const upload: RichTextCustomElement = {
|
||||
name: uploadName,
|
||||
Button,
|
||||
Element,
|
||||
plugins: [plugin],
|
||||
plugins: [WithUpload],
|
||||
}
|
||||
|
||||
export default upload
|
||||
|
||||
@@ -1,10 +1,18 @@
|
||||
const withRelationship = (incomingEditor) => {
|
||||
'use client'
|
||||
|
||||
import type React from 'react'
|
||||
|
||||
import { useSlatePlugin } from '../../../utilities/useSlatePlugin'
|
||||
import { uploadName } from './shared'
|
||||
|
||||
export const WithUpload: React.FC = () => {
|
||||
useSlatePlugin('withUpload', (incomingEditor) => {
|
||||
const editor = incomingEditor
|
||||
const { isVoid } = editor
|
||||
|
||||
editor.isVoid = (element) => (element.type === 'upload' ? true : isVoid(element))
|
||||
editor.isVoid = (element) => (element.type === uploadName ? true : isVoid(element))
|
||||
|
||||
return editor
|
||||
})
|
||||
return null
|
||||
}
|
||||
|
||||
export default withRelationship
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
export const uploadName = 'upload'
|
||||
export const uploadFieldsSchemaPath = 'upload.fields'
|
||||
@@ -0,0 +1,9 @@
|
||||
import type { Element } from 'slate'
|
||||
|
||||
export type UploadElementType = Element & {
|
||||
fields: Record<string, unknown>
|
||||
relationTo: string
|
||||
value: {
|
||||
id: number | string
|
||||
} | null
|
||||
}
|
||||
@@ -9,7 +9,9 @@ import React from 'react'
|
||||
import type { AdapterArguments, RichTextCustomElement, RichTextCustomLeaf } from '.'
|
||||
|
||||
import elementTypes from './field/elements'
|
||||
import { linkFieldsSchemaPath } from './field/elements/link/shared'
|
||||
import { transformExtraFields } from './field/elements/link/utilities'
|
||||
import { uploadFieldsSchemaPath } from './field/elements/upload/shared'
|
||||
import leafTypes from './field/leaves'
|
||||
|
||||
export const getGenerateComponentMap =
|
||||
@@ -81,13 +83,44 @@ export const getGenerateComponentMap =
|
||||
readOnly: false,
|
||||
})
|
||||
|
||||
componentMap.set('link.fields', mappedFields)
|
||||
componentMap.set(linkFieldsSchemaPath, mappedFields)
|
||||
|
||||
break
|
||||
}
|
||||
|
||||
case 'upload':
|
||||
case 'upload': {
|
||||
const uploadEnabledCollections = config.collections.filter(
|
||||
({ admin: { enableRichTextRelationship, hidden }, upload }) => {
|
||||
if (hidden === true) {
|
||||
return false
|
||||
}
|
||||
|
||||
return enableRichTextRelationship && Boolean(upload) === true
|
||||
},
|
||||
)
|
||||
|
||||
uploadEnabledCollections.forEach((collection) => {
|
||||
if (args?.admin?.upload?.collections[collection.slug]?.fields) {
|
||||
const uploadFields = sanitizeFields({
|
||||
config,
|
||||
fields: args?.admin?.upload?.collections[collection.slug]?.fields,
|
||||
validRelationships,
|
||||
})
|
||||
|
||||
const mappedFields = mapFields({
|
||||
config,
|
||||
fieldSchema: uploadFields,
|
||||
operation: 'update',
|
||||
permissions: {},
|
||||
readOnly: false,
|
||||
})
|
||||
|
||||
componentMap.set(`${uploadFieldsSchemaPath}.${collection.slug}`, mappedFields)
|
||||
}
|
||||
})
|
||||
|
||||
break
|
||||
}
|
||||
|
||||
case 'relationship':
|
||||
break
|
||||
|
||||
@@ -9,6 +9,7 @@ import type { AdapterArguments, RichTextCustomElement } from '.'
|
||||
import elementTypes from './field/elements'
|
||||
import { linkFieldsSchemaPath } from './field/elements/link/shared'
|
||||
import { transformExtraFields } from './field/elements/link/utilities'
|
||||
import { uploadFieldsSchemaPath } from './field/elements/upload/shared'
|
||||
|
||||
export const getGenerateSchemaMap =
|
||||
(args: AdapterArguments): RichTextAdapter['generateSchemaMap'] =>
|
||||
@@ -29,18 +30,44 @@ export const getGenerateSchemaMap =
|
||||
switch (element.name) {
|
||||
case 'link': {
|
||||
const linkFields = sanitizeFields({
|
||||
config: config,
|
||||
config,
|
||||
fields: transformExtraFields(args.admin?.link?.fields, config, i18n),
|
||||
validRelationships,
|
||||
})
|
||||
|
||||
schemaMap.set(`${schemaPath}.${linkFieldsSchemaPath}`, linkFields)
|
||||
|
||||
return
|
||||
break
|
||||
}
|
||||
|
||||
case 'upload':
|
||||
case 'upload': {
|
||||
const uploadEnabledCollections = config.collections.filter(
|
||||
({ admin: { enableRichTextRelationship, hidden }, upload }) => {
|
||||
if (hidden === true) {
|
||||
return false
|
||||
}
|
||||
|
||||
return enableRichTextRelationship && Boolean(upload) === true
|
||||
},
|
||||
)
|
||||
|
||||
uploadEnabledCollections.forEach((collection) => {
|
||||
if (args?.admin?.upload?.collections[collection.slug]?.fields) {
|
||||
const uploadFields = sanitizeFields({
|
||||
config,
|
||||
fields: args?.admin?.upload?.collections[collection.slug]?.fields,
|
||||
validRelationships,
|
||||
})
|
||||
|
||||
schemaMap.set(
|
||||
`${schemaPath}.${uploadFieldsSchemaPath}.${collection.slug}`,
|
||||
uploadFields,
|
||||
)
|
||||
}
|
||||
})
|
||||
|
||||
break
|
||||
}
|
||||
|
||||
case 'relationship':
|
||||
break
|
||||
|
||||
5
packages/translations/dist/build.js
vendored
@@ -166,6 +166,11 @@ const clientTranslationKeys = [
|
||||
'fields:showAll',
|
||||
'fields:swapRelationship',
|
||||
'fields:uploadNewLabel',
|
||||
'fields:swapUpload',
|
||||
'fields:addUpload',
|
||||
'fields:editRelationship',
|
||||
'fields:removeUpload',
|
||||
'fields:saveChanges',
|
||||
'general:aboutToDeleteCount',
|
||||
'general:aboutToDelete',
|
||||
'general:addBelow',
|
||||
|
||||
5
packages/translations/dist/client/ar.json
vendored
@@ -57,20 +57,25 @@
|
||||
"addLink": "أضف رابط",
|
||||
"addNew": "أضف جديد",
|
||||
"addNewLabel": "أضف {{label}} جديد",
|
||||
"addUpload": "أضف تحميل",
|
||||
"block": "وحدة محتوى",
|
||||
"blockType": "نوع وحدة المحتوى",
|
||||
"blocks": "وحدات المحتوى",
|
||||
"chooseFromExisting": "اختر من القائمة",
|
||||
"collapseAll": "طيّ الكلّ",
|
||||
"editLink": "عدّل الرّابط",
|
||||
"editRelationship": "عدّل العلاقة",
|
||||
"itemsAndMore": "{{items}} و {{count}} أخرى",
|
||||
"latitude": "خطّ العرض",
|
||||
"longitude": "خطّ الطّول",
|
||||
"passwordsDoNotMatch": "كلمة المرور غير مطابقة.",
|
||||
"removeUpload": "حذف المحتوى المرفوع",
|
||||
"saveChanges": "حفظ التّغييرات",
|
||||
"searchForBlock": "ابحث عن وحدة محتوى",
|
||||
"selectFieldsToEdit": "حدّد الحقول اللتي تريد تعديلها",
|
||||
"showAll": "إظهار الكلّ",
|
||||
"swapRelationship": "تبديل العلاقة",
|
||||
"swapUpload": "تبديل المحتوى المرفوع",
|
||||
"uploadNewLabel": "رفع {{label}} جديد"
|
||||
},
|
||||
"general": {
|
||||
|
||||
5
packages/translations/dist/client/az.json
vendored
@@ -57,20 +57,25 @@
|
||||
"addLink": "Keçid əlavə et",
|
||||
"addNew": "Yenisini əlavə et",
|
||||
"addNewLabel": "Yeni {{label}} əlavə et",
|
||||
"addUpload": "Yükləmə əlavə et",
|
||||
"block": "blok",
|
||||
"blockType": "Blok Növü",
|
||||
"blocks": "bloklar",
|
||||
"chooseFromExisting": "Mövcuddan seçin",
|
||||
"collapseAll": "Hamısını Bağla",
|
||||
"editLink": "Keçidi redaktə et",
|
||||
"editRelationship": "Relationship redaktə et",
|
||||
"itemsAndMore": "{{items}} və daha {{count}} nəfər",
|
||||
"latitude": "Enlik",
|
||||
"longitude": "Uzunluq",
|
||||
"passwordsDoNotMatch": "Şifrələr uyğun gəlmir.",
|
||||
"removeUpload": "Yükləməni sil",
|
||||
"saveChanges": "Dəyişiklikləri saxla",
|
||||
"searchForBlock": "Blok üçün axtarış",
|
||||
"selectFieldsToEdit": "Redaktə ediləcək sahələri seçin",
|
||||
"showAll": "Hamısını Göstər",
|
||||
"swapRelationship": "Relationship dəyiş",
|
||||
"swapUpload": "Yükləməni dəyiş",
|
||||
"uploadNewLabel": "Yeni {{label}} yüklə"
|
||||
},
|
||||
"general": {
|
||||
|
||||
5
packages/translations/dist/client/bg.json
vendored
@@ -57,20 +57,25 @@
|
||||
"addLink": "Добави нова връзка",
|
||||
"addNew": "Добави нов",
|
||||
"addNewLabel": "Добави нов {{label}}",
|
||||
"addUpload": "Качи",
|
||||
"block": "блок",
|
||||
"blockType": "Тип блок",
|
||||
"blocks": "блокове",
|
||||
"chooseFromExisting": "Избери от съществуващите",
|
||||
"collapseAll": "Свий всички",
|
||||
"editLink": "Редактирай връзка",
|
||||
"editRelationship": "Редактирай отношение",
|
||||
"itemsAndMore": "{{items}} и {{count}} повече",
|
||||
"latitude": "Географска ширина",
|
||||
"longitude": "Географска дължина",
|
||||
"passwordsDoNotMatch": "Паролите не са еднакви.",
|
||||
"removeUpload": "Премахни качване",
|
||||
"saveChanges": "Запази промените",
|
||||
"searchForBlock": "Търси блок",
|
||||
"selectFieldsToEdit": "Избери полета за редактиране",
|
||||
"showAll": "Покажи всички",
|
||||
"swapRelationship": "Смени отношение",
|
||||
"swapUpload": "Смени качване",
|
||||
"uploadNewLabel": "Качи нов {{label}}"
|
||||
},
|
||||
"general": {
|
||||
|
||||
5
packages/translations/dist/client/cs.json
vendored
@@ -57,20 +57,25 @@
|
||||
"addLink": "Přidat Odkaz",
|
||||
"addNew": "Přidat nový",
|
||||
"addNewLabel": "Přidat nový {{label}}",
|
||||
"addUpload": "Přidat nahrávání",
|
||||
"block": "blok",
|
||||
"blockType": "Typ bloku",
|
||||
"blocks": "bloky",
|
||||
"chooseFromExisting": "Vybrat z existujících",
|
||||
"collapseAll": "Sbalit vše",
|
||||
"editLink": "Upravit odkaz",
|
||||
"editRelationship": "Upravit vztah",
|
||||
"itemsAndMore": "{{items}} a {{count}} dalších",
|
||||
"latitude": "Zeměpisná šířka",
|
||||
"longitude": "Zeměpisná délka",
|
||||
"passwordsDoNotMatch": "Hesla se neshodují.",
|
||||
"removeUpload": "Odstranit nahrání",
|
||||
"saveChanges": "Uložit změny",
|
||||
"searchForBlock": "Hledat blok",
|
||||
"selectFieldsToEdit": "Vyberte pole, která chcete upravit",
|
||||
"showAll": "Zobrazit vše",
|
||||
"swapRelationship": "Zaměnit vztah",
|
||||
"swapUpload": "Vyměnit nahrání",
|
||||
"uploadNewLabel": "Nahrát nový {{label}}"
|
||||
},
|
||||
"general": {
|
||||
|
||||
5
packages/translations/dist/client/de.json
vendored
@@ -57,20 +57,25 @@
|
||||
"addLink": "Link Hinzufügen",
|
||||
"addNew": "Neu erstellen",
|
||||
"addNewLabel": "{{label}} erstellen",
|
||||
"addUpload": "Hochladen Hinzufügen",
|
||||
"block": "Block",
|
||||
"blockType": "Block-Typ",
|
||||
"blocks": "Blöcke",
|
||||
"chooseFromExisting": "Aus vorhandenen auswählen",
|
||||
"collapseAll": "Alle einklappen",
|
||||
"editLink": "Bearbeite Link",
|
||||
"editRelationship": "Beziehung Hinzufügen",
|
||||
"itemsAndMore": "{{items}} und {{count}} mehr",
|
||||
"latitude": "Breitengrad",
|
||||
"longitude": "Längengrad",
|
||||
"passwordsDoNotMatch": "Passwörter stimmen nicht überein.",
|
||||
"removeUpload": "Hochgeladene Datei Löschen",
|
||||
"saveChanges": "Änderungen speichern",
|
||||
"searchForBlock": "Nach Block suchen",
|
||||
"selectFieldsToEdit": "Wählen Sie die zu bearbeitenden Felder aus",
|
||||
"showAll": "Alle anzeigen",
|
||||
"swapRelationship": "Beziehung Tauschen",
|
||||
"swapUpload": "Datei Austauschen",
|
||||
"uploadNewLabel": "{{label}} neu hochladen"
|
||||
},
|
||||
"general": {
|
||||
|
||||
5
packages/translations/dist/client/en.json
vendored
@@ -59,20 +59,25 @@
|
||||
"addLink": "Add Link",
|
||||
"addNew": "Add new",
|
||||
"addNewLabel": "Add new {{label}}",
|
||||
"addUpload": "Add Upload",
|
||||
"block": "block",
|
||||
"blockType": "Block Type",
|
||||
"blocks": "blocks",
|
||||
"chooseFromExisting": "Choose from existing",
|
||||
"collapseAll": "Collapse All",
|
||||
"editLink": "Edit Link",
|
||||
"editRelationship": "Edit Relationship",
|
||||
"itemsAndMore": "{{items}} and {{count}} more",
|
||||
"latitude": "Latitude",
|
||||
"longitude": "Longitude",
|
||||
"passwordsDoNotMatch": "Passwords do not match.",
|
||||
"removeUpload": "Remove Upload",
|
||||
"saveChanges": "Save changes",
|
||||
"searchForBlock": "Search for a block",
|
||||
"selectFieldsToEdit": "Select fields to edit",
|
||||
"showAll": "Show All",
|
||||
"swapRelationship": "Swap Relationship",
|
||||
"swapUpload": "Swap Upload",
|
||||
"uploadNewLabel": "Upload new {{label}}"
|
||||
},
|
||||
"general": {
|
||||
|
||||
5
packages/translations/dist/client/es.json
vendored
@@ -57,20 +57,25 @@
|
||||
"addLink": "Añadir Enlace",
|
||||
"addNew": "Añadir nuevo",
|
||||
"addNewLabel": "Añadir {{label}}",
|
||||
"addUpload": "Añadir Carga",
|
||||
"block": "bloque",
|
||||
"blockType": "Tipo de bloque",
|
||||
"blocks": "bloques",
|
||||
"chooseFromExisting": "Elegir existente",
|
||||
"collapseAll": "Colapsar todo",
|
||||
"editLink": "Editar Enlace",
|
||||
"editRelationship": "Editar Relación",
|
||||
"itemsAndMore": "{{items}} y {{count}} más",
|
||||
"latitude": "Latitud",
|
||||
"longitude": "Longitud",
|
||||
"passwordsDoNotMatch": "Las contraseñas no coinciden.",
|
||||
"removeUpload": "Quitar Carga",
|
||||
"saveChanges": "Guardar cambios",
|
||||
"searchForBlock": "Buscar bloque",
|
||||
"selectFieldsToEdit": "Seleccionar campos para editar",
|
||||
"showAll": "Mostrar Todo",
|
||||
"swapRelationship": "Cambiar Relación",
|
||||
"swapUpload": "Cambiar carga",
|
||||
"uploadNewLabel": "Subir nuevo {{label}}"
|
||||
},
|
||||
"general": {
|
||||
|
||||
5
packages/translations/dist/client/fa.json
vendored
@@ -57,20 +57,25 @@
|
||||
"addLink": "افزودن پیوند",
|
||||
"addNew": "افزودن",
|
||||
"addNewLabel": "افزودن {{label}} تازه",
|
||||
"addUpload": "افزودن بارگذار",
|
||||
"block": "بلوک",
|
||||
"blockType": "نوع بلوک",
|
||||
"blocks": "بلوکها",
|
||||
"chooseFromExisting": "برگزیدن از بین ورودیها",
|
||||
"collapseAll": "بستن همه",
|
||||
"editLink": "نگارش پیوند",
|
||||
"editRelationship": "نگارش پیوستگی",
|
||||
"itemsAndMore": "{{items}} و {{count}} بیشتر",
|
||||
"latitude": "عرض جغرافیایی",
|
||||
"longitude": "طول جغرافیایی",
|
||||
"passwordsDoNotMatch": "گذرواژههای وارد شده مطابقت ندارند.",
|
||||
"removeUpload": "حذف بارگذار",
|
||||
"saveChanges": "ذخیره تغییرات",
|
||||
"searchForBlock": "جستوجو برای بلوک",
|
||||
"selectFieldsToEdit": "انتخاب کادرها برای نگارش",
|
||||
"showAll": "نمایش کل",
|
||||
"swapRelationship": "تبادل پیوستگی",
|
||||
"swapUpload": "تبادل بارگذار",
|
||||
"uploadNewLabel": "بارگذاری تازه {{label}}"
|
||||
},
|
||||
"general": {
|
||||
|
||||
5
packages/translations/dist/client/fr.json
vendored
@@ -57,20 +57,25 @@
|
||||
"addLink": "Ajouter un Lien",
|
||||
"addNew": "Ajouter nouveau ou nouvelle",
|
||||
"addNewLabel": "Ajouter nouveau ou nouvelle {{label}}",
|
||||
"addUpload": "Ajouter le téléchargement",
|
||||
"block": "bloc",
|
||||
"blockType": "Type de bloc",
|
||||
"blocks": "blocs",
|
||||
"chooseFromExisting": "Choisir parmi les existant(e)s",
|
||||
"collapseAll": "Tout réduire",
|
||||
"editLink": "Modifier le lien",
|
||||
"editRelationship": "Modifier la relation",
|
||||
"itemsAndMore": "{{items}} et {{count}} de plus",
|
||||
"latitude": "Latitude",
|
||||
"longitude": "Longitude",
|
||||
"passwordsDoNotMatch": "Les mots de passe ne correspondent pas.",
|
||||
"removeUpload": "Supprimer le Téléversement",
|
||||
"saveChanges": "Sauvegarder les modifications",
|
||||
"searchForBlock": "Rechercher un bloc",
|
||||
"selectFieldsToEdit": "Sélectionnez les champs à modifier",
|
||||
"showAll": "Afficher tout",
|
||||
"swapRelationship": "Changer de relation",
|
||||
"swapUpload": "Changer de Fichier",
|
||||
"uploadNewLabel": "Téléverser un(e) nouveau ou nouvelle {{label}}"
|
||||
},
|
||||
"general": {
|
||||
|
||||
5
packages/translations/dist/client/hr.json
vendored
@@ -57,20 +57,25 @@
|
||||
"addLink": "Dodaj poveznicu",
|
||||
"addNew": "Dodaj novi",
|
||||
"addNewLabel": "Dodaj novi {{label}}",
|
||||
"addUpload": "Dodaj učitavanje",
|
||||
"block": "blokiranje",
|
||||
"blockType": "Vrsta blokiranja",
|
||||
"blocks": "blokiranja",
|
||||
"chooseFromExisting": "Odaberite iz postojećih.",
|
||||
"collapseAll": "Sažmi sve",
|
||||
"editLink": "Uredi poveznicu",
|
||||
"editRelationship": "Uredi odnos",
|
||||
"itemsAndMore": "{{items}} i {{count}} više",
|
||||
"latitude": "Zemljopisna širina",
|
||||
"longitude": "Zemljopisna dužina",
|
||||
"passwordsDoNotMatch": "Lozinke nisu iste.",
|
||||
"removeUpload": "Ukloni prijenos",
|
||||
"saveChanges": "Spremi promjene",
|
||||
"searchForBlock": "Potraži blok",
|
||||
"selectFieldsToEdit": "Odaberite polja za uređivanje",
|
||||
"showAll": "Pokaži sve",
|
||||
"swapRelationship": "Zamijeni vezu",
|
||||
"swapUpload": "Zamijeni prijenos",
|
||||
"uploadNewLabel": "Učitaj novi {{label}}"
|
||||
},
|
||||
"general": {
|
||||
|
||||
5
packages/translations/dist/client/hu.json
vendored
@@ -57,20 +57,25 @@
|
||||
"addLink": "Link hozzáadása",
|
||||
"addNew": "Új hozzáadása",
|
||||
"addNewLabel": "Új {{label}} hozzáadása",
|
||||
"addUpload": "Feltöltés hozzáadása",
|
||||
"block": "blokk",
|
||||
"blockType": "Blokk típusa",
|
||||
"blocks": "blokkok",
|
||||
"chooseFromExisting": "Válasszon a meglévők közül",
|
||||
"collapseAll": "Mindet összecsuk",
|
||||
"editLink": "Link szerkesztése",
|
||||
"editRelationship": "Kapcsolat hozzáadása",
|
||||
"itemsAndMore": "{{items}} és további {{count}}",
|
||||
"latitude": "Szélesség",
|
||||
"longitude": "Hosszúság",
|
||||
"passwordsDoNotMatch": "A jelszavak nem egyeznek.",
|
||||
"removeUpload": "Feltöltés eltávolítása",
|
||||
"saveChanges": "Módosítások mentése",
|
||||
"searchForBlock": "Blokk keresése",
|
||||
"selectFieldsToEdit": "Válassza ki a szerkeszteni kívánt mezőket",
|
||||
"showAll": "Az összes megjelenítése",
|
||||
"swapRelationship": "Kapcsolat csere",
|
||||
"swapUpload": "Feltöltés csere",
|
||||
"uploadNewLabel": "Új {{label}} feltöltése"
|
||||
},
|
||||
"general": {
|
||||
|
||||
5
packages/translations/dist/client/it.json
vendored
@@ -57,20 +57,25 @@
|
||||
"addLink": "Aggiungi Collegamento",
|
||||
"addNew": "Aggiungi nuovo",
|
||||
"addNewLabel": "Aggiungi nuovo {{label}}",
|
||||
"addUpload": "aggiungi Carica",
|
||||
"block": "blocco",
|
||||
"blockType": "Tipo di Blocco",
|
||||
"blocks": "blocchi",
|
||||
"chooseFromExisting": "Scegli tra esistente",
|
||||
"collapseAll": "Comprimi tutto",
|
||||
"editLink": "Modifica Collegamento",
|
||||
"editRelationship": "Modifica Relazione",
|
||||
"itemsAndMore": "{{items}} e altri {{count}}",
|
||||
"latitude": "Latitudine",
|
||||
"longitude": "Longitudine",
|
||||
"passwordsDoNotMatch": "Le password non corrispondono.",
|
||||
"removeUpload": "Rimuovi Upload",
|
||||
"saveChanges": "Salva modifiche",
|
||||
"searchForBlock": "Cerca un blocco",
|
||||
"selectFieldsToEdit": "Seleziona i campi da modificare",
|
||||
"showAll": "Mostra tutto",
|
||||
"swapRelationship": "Cambia Relationship",
|
||||
"swapUpload": "Cambia Upload",
|
||||
"uploadNewLabel": "Carica nuovo {{label}}"
|
||||
},
|
||||
"general": {
|
||||
|
||||
5
packages/translations/dist/client/ja.json
vendored
@@ -59,20 +59,25 @@
|
||||
"addLink": "リンクを追加",
|
||||
"addNew": "新規追加",
|
||||
"addNewLabel": "{{label}} を新規追加",
|
||||
"addUpload": "アップロードを追加",
|
||||
"block": "ブロック",
|
||||
"blockType": "ブロックタイプ",
|
||||
"blocks": "ブロック",
|
||||
"chooseFromExisting": "既存から選択",
|
||||
"collapseAll": "すべて閉じる",
|
||||
"editLink": "リンクを編集",
|
||||
"editRelationship": "リレーションシップを編集",
|
||||
"itemsAndMore": "{{items}} 他{{count}}件",
|
||||
"latitude": "緯度",
|
||||
"longitude": "経度",
|
||||
"passwordsDoNotMatch": "パスワードが一致しません",
|
||||
"removeUpload": "削除",
|
||||
"saveChanges": "変更を保存",
|
||||
"searchForBlock": "ブロックを検索",
|
||||
"selectFieldsToEdit": "編集するフィールドを選択",
|
||||
"showAll": "すべて開く",
|
||||
"swapRelationship": "スワップ関係",
|
||||
"swapUpload": "差し替え",
|
||||
"uploadNewLabel": "新規 {{label}} アップロード"
|
||||
},
|
||||
"general": {
|
||||
|
||||
5
packages/translations/dist/client/ko.json
vendored
@@ -56,20 +56,25 @@
|
||||
"addLink": "링크 추가",
|
||||
"addNew": "새로 추가",
|
||||
"addNewLabel": "새로운 {{label}} 추가",
|
||||
"addUpload": "업로드 추가",
|
||||
"block": "블록",
|
||||
"blockType": "블록 유형",
|
||||
"blocks": "블록",
|
||||
"chooseFromExisting": "기존 항목 중 선택",
|
||||
"collapseAll": "모두 접기",
|
||||
"editLink": "링크 수정",
|
||||
"editRelationship": "관계 수정",
|
||||
"itemsAndMore": "{{items}} 및 {{count}}개 더",
|
||||
"latitude": "위도",
|
||||
"longitude": "경도",
|
||||
"passwordsDoNotMatch": "비밀번호가 일치하지 않습니다.",
|
||||
"removeUpload": "제거",
|
||||
"saveChanges": "변경 사항 저장",
|
||||
"searchForBlock": "블록 검색",
|
||||
"selectFieldsToEdit": "수정할 입력란 선택",
|
||||
"showAll": "모두 표시",
|
||||
"swapRelationship": "관계 교체",
|
||||
"swapUpload": "업로드 교체",
|
||||
"uploadNewLabel": "새로운 {{label}} 업로드"
|
||||
},
|
||||
"general": {
|
||||
|
||||
5
packages/translations/dist/client/my.json
vendored
@@ -57,20 +57,25 @@
|
||||
"addLink": "လင့်ခ်ထည့်ပါ။",
|
||||
"addNew": "အသစ် ထည့်သွင်းမည်။",
|
||||
"addNewLabel": "{{label}} အားအသစ် ထည့်သွင်းမည်။",
|
||||
"addUpload": "Upload ထည့်ပါ။",
|
||||
"block": "ဘလောက်",
|
||||
"blockType": "ဘလောက် အမျိုးအစား",
|
||||
"blocks": "ဘလောက်များ",
|
||||
"chooseFromExisting": "ရှိပြီးသားထဲကပဲ ရွေးချယ်ပါ။",
|
||||
"collapseAll": "အားလုံးကို ခေါက်သိမ်းပါ။",
|
||||
"editLink": "လင့်ခ်ကို တည်းဖြတ်ပါ။",
|
||||
"editRelationship": "ဆက်ဆံရေးကို တည်းဖြတ်ပါ။",
|
||||
"itemsAndMore": "{{items}} နှင့် နောက်ထပ် {{count}} ခု",
|
||||
"latitude": "vĩ độ",
|
||||
"longitude": "လောင်ဂျီကျု",
|
||||
"passwordsDoNotMatch": "စကားဝှက်များနှင့် မကိုက်ညီပါ။",
|
||||
"removeUpload": "အပ်လုဒ်ကို ဖယ်ရှားပါ။",
|
||||
"saveChanges": "သိမ်းဆည်းမည်။",
|
||||
"searchForBlock": "ဘလောက်တစ်ခုရှာမည်။",
|
||||
"selectFieldsToEdit": "တည်းဖြတ်ရန် အကွက်များကို ရွေးပါ။",
|
||||
"showAll": "အကုန် ကြည့်မည်။",
|
||||
"swapRelationship": "လဲလှယ်ဆက်ဆံရေး",
|
||||
"swapUpload": "အပ်လုဒ်ဖလှယ်ပါ။",
|
||||
"uploadNewLabel": "{{label}} အသစ်တင်မည်။"
|
||||
},
|
||||
"general": {
|
||||
|
||||
5
packages/translations/dist/client/nb.json
vendored
@@ -57,20 +57,25 @@
|
||||
"addLink": "Legg til Lenke",
|
||||
"addNew": "Legg til ny",
|
||||
"addNewLabel": "Legg til ny {{label}}",
|
||||
"addUpload": "Legg til Opplasting",
|
||||
"block": "blokk",
|
||||
"blockType": "Blokktype",
|
||||
"blocks": "blokker",
|
||||
"chooseFromExisting": "Velg fra eksisterende",
|
||||
"collapseAll": "Skjul alle",
|
||||
"editLink": "Rediger lenke",
|
||||
"editRelationship": "Rediger relasjon",
|
||||
"itemsAndMore": "{{items}} og {{count}} flere",
|
||||
"latitude": "Breddegrad",
|
||||
"longitude": "Lengdegrad",
|
||||
"passwordsDoNotMatch": "Passordene er ikke like.",
|
||||
"removeUpload": "Fjern Opplasting",
|
||||
"saveChanges": "Lagre endringer",
|
||||
"searchForBlock": "Søk etter en blokk",
|
||||
"selectFieldsToEdit": "Velg felt som skal redigeres",
|
||||
"showAll": "Vis alle",
|
||||
"swapRelationship": "Bytte Forhold",
|
||||
"swapUpload": "Bytt Opplasting",
|
||||
"uploadNewLabel": "Last opp ny {{label}}"
|
||||
},
|
||||
"general": {
|
||||
|
||||
5
packages/translations/dist/client/nl.json
vendored
@@ -57,20 +57,25 @@
|
||||
"addLink": "Voeg een link toe",
|
||||
"addNew": "Nieuw(e)",
|
||||
"addNewLabel": "Nieuw(e) {{label}} toevoegen",
|
||||
"addUpload": "Upload Toevoegen",
|
||||
"block": "blok",
|
||||
"blockType": "Bloktype",
|
||||
"blocks": "blokken",
|
||||
"chooseFromExisting": "Kies uit bestaande",
|
||||
"collapseAll": "Alles samenvouwen",
|
||||
"editLink": "Link bewerken",
|
||||
"editRelationship": "Relatie Relatie",
|
||||
"itemsAndMore": "{{items}} en {{count}} meer",
|
||||
"latitude": "Breedtegraad",
|
||||
"longitude": "Lengtegraad",
|
||||
"passwordsDoNotMatch": "Wachtwoorden komen niet overeen.",
|
||||
"removeUpload": "Verwijder Upload",
|
||||
"saveChanges": "Bewaar aanpassingen",
|
||||
"searchForBlock": "Zoeken naar een blok",
|
||||
"selectFieldsToEdit": "Selecteer velden om te bewerken",
|
||||
"showAll": "Alles tonen",
|
||||
"swapRelationship": "Relatie Wisselen",
|
||||
"swapUpload": "Upload Verwisselen",
|
||||
"uploadNewLabel": "Upload nieuw(e) {{label}}"
|
||||
},
|
||||
"general": {
|
||||
|
||||
5
packages/translations/dist/client/pl.json
vendored
@@ -57,20 +57,25 @@
|
||||
"addLink": "Dodaj Link",
|
||||
"addNew": "Dodaj nowy",
|
||||
"addNewLabel": "Dodaj nowy {{label}}",
|
||||
"addUpload": "Dodaj ładowanie",
|
||||
"block": "Blok",
|
||||
"blockType": "Typ Bloku",
|
||||
"blocks": "Bloki",
|
||||
"chooseFromExisting": "Wybierz z istniejących",
|
||||
"collapseAll": "Zwiń wszystko",
|
||||
"editLink": "Edytuj Link",
|
||||
"editRelationship": "Edytuj Relację",
|
||||
"itemsAndMore": "{{items}} i {{count}} więcej",
|
||||
"latitude": "Szerokość",
|
||||
"longitude": "Długość geograficzna",
|
||||
"passwordsDoNotMatch": "Hasła nie pasują",
|
||||
"removeUpload": "Usuń Wrzucone",
|
||||
"saveChanges": "Zapisz zmiany",
|
||||
"searchForBlock": "Szukaj bloku",
|
||||
"selectFieldsToEdit": "Wybierz pola do edycji",
|
||||
"showAll": "Pokaż wszystkie",
|
||||
"swapRelationship": "Zamiana Relacji",
|
||||
"swapUpload": "Zamień Wrzucone",
|
||||
"uploadNewLabel": "Wrzuć nowy {{label}}"
|
||||
},
|
||||
"general": {
|
||||
|
||||
5
packages/translations/dist/client/pt.json
vendored
@@ -57,20 +57,25 @@
|
||||
"addLink": "Adicionar Link",
|
||||
"addNew": "Adicionar novo",
|
||||
"addNewLabel": "Adicionar novo {{label}}",
|
||||
"addUpload": "Adicionar Upload",
|
||||
"block": "bloco",
|
||||
"blockType": "Tipo de bloco",
|
||||
"blocks": "blocos",
|
||||
"chooseFromExisting": "Escolher entre os existentes",
|
||||
"collapseAll": "Recolher todos",
|
||||
"editLink": "Editar Link",
|
||||
"editRelationship": "Editar Relacionamento",
|
||||
"itemsAndMore": "{{items}} e mais {{count}}",
|
||||
"latitude": "Latitude",
|
||||
"longitude": "Longitude",
|
||||
"passwordsDoNotMatch": "Senhas não coincidem.",
|
||||
"removeUpload": "Remover Upload",
|
||||
"saveChanges": "Salvar alterações",
|
||||
"searchForBlock": "Procurar bloco",
|
||||
"selectFieldsToEdit": "Selecione os campos para editar",
|
||||
"showAll": "Mostrar Tudo",
|
||||
"swapRelationship": "Relação de Troca",
|
||||
"swapUpload": "Substituir Upload",
|
||||
"uploadNewLabel": "Carregar novo(a) {{label}}"
|
||||
},
|
||||
"general": {
|
||||
|
||||
5
packages/translations/dist/client/ro.json
vendored
@@ -57,20 +57,25 @@
|
||||
"addLink": "Adăugați un link",
|
||||
"addNew": "Adăugați un nou",
|
||||
"addNewLabel": "Adăugați un nou {{label}}",
|
||||
"addUpload": "Adăugați un fișier",
|
||||
"block": "bloc",
|
||||
"blockType": "Tip de bloc",
|
||||
"blocks": "Blocuri",
|
||||
"chooseFromExisting": "Alegeți dintre cele existente",
|
||||
"collapseAll": "Colapsează toate",
|
||||
"editLink": "Editați Link-ul",
|
||||
"editRelationship": "Editați relația",
|
||||
"itemsAndMore": "{{items}} şi {{count}} mai multe",
|
||||
"latitude": "Latitudine",
|
||||
"longitude": "Longitudine",
|
||||
"passwordsDoNotMatch": "Parolele nu corespund.",
|
||||
"removeUpload": "Eliminați încărcarea",
|
||||
"saveChanges": "Salvați modificările",
|
||||
"searchForBlock": "Căutați un bloc",
|
||||
"selectFieldsToEdit": "Selectați câmpurile de editat",
|
||||
"showAll": "Afișați toate",
|
||||
"swapRelationship": "Schimbați relația",
|
||||
"swapUpload": "Schimbați Încărcarea",
|
||||
"uploadNewLabel": "Încărcați un nou {{label}}"
|
||||
},
|
||||
"general": {
|
||||
|
||||
@@ -57,20 +57,25 @@
|
||||
"addLink": "Dodaj link",
|
||||
"addNew": "Dodaj novi",
|
||||
"addNewLabel": "Dodaj novi {{label}}",
|
||||
"addUpload": "Dodaj učitavanje",
|
||||
"block": "blokiranje",
|
||||
"blockType": "Vrsta blokiranja",
|
||||
"blocks": "blokiranja",
|
||||
"chooseFromExisting": "Odaberite iz postojećih.",
|
||||
"collapseAll": "Skupi sve",
|
||||
"editLink": "Izmeni link",
|
||||
"editRelationship": "Izmeni odnos",
|
||||
"itemsAndMore": "{{items}} i {{count}} više",
|
||||
"latitude": "Geografska širina",
|
||||
"longitude": "Geografska dužina",
|
||||
"passwordsDoNotMatch": "Lozinke nisu iste.",
|
||||
"removeUpload": "Ukloni prenos",
|
||||
"saveChanges": "Sačuvaj promene",
|
||||
"searchForBlock": "Pretraži blok",
|
||||
"selectFieldsToEdit": "Odaberite polja za promenu",
|
||||
"showAll": "Pokaži sve",
|
||||
"swapRelationship": "Zameni vezu",
|
||||
"swapUpload": "Zameni prenos",
|
||||
"uploadNewLabel": "Učitaj novi {{label}}"
|
||||
},
|
||||
"general": {
|
||||
|
||||
5
packages/translations/dist/client/rs.json
vendored
@@ -57,20 +57,25 @@
|
||||
"addLink": "Додај линк",
|
||||
"addNew": "Додај нови",
|
||||
"addNewLabel": "Додај нови {{label}}",
|
||||
"addUpload": "Додај учитавање",
|
||||
"block": "блокирање",
|
||||
"blockType": "Врста блокирања",
|
||||
"blocks": "блокирања",
|
||||
"chooseFromExisting": "Одаберите из постојећих.",
|
||||
"collapseAll": "Скупи све",
|
||||
"editLink": "Измени линк",
|
||||
"editRelationship": "Измени однос",
|
||||
"itemsAndMore": "{{items}} и {{count}} више",
|
||||
"latitude": "Географска ширина",
|
||||
"longitude": "Географска дужина",
|
||||
"passwordsDoNotMatch": "Лозинке нису исте.",
|
||||
"removeUpload": "Уклони пренос",
|
||||
"saveChanges": "Сачувај промене",
|
||||
"searchForBlock": "Претражи блок",
|
||||
"selectFieldsToEdit": "Одаберите поља за промену",
|
||||
"showAll": "Покажи све",
|
||||
"swapRelationship": "Замени везу",
|
||||
"swapUpload": "Замени пренос",
|
||||
"uploadNewLabel": "Учитај нови {{label}}"
|
||||
},
|
||||
"general": {
|
||||
|
||||
5
packages/translations/dist/client/ru.json
vendored
@@ -57,20 +57,25 @@
|
||||
"addLink": "Добавить ссылку",
|
||||
"addNew": "Добавить новый",
|
||||
"addNewLabel": "Добавить {{label}}",
|
||||
"addUpload": "Добавить загрузку",
|
||||
"block": "Блок",
|
||||
"blockType": "Тип Блока",
|
||||
"blocks": "Блоки",
|
||||
"chooseFromExisting": "Выбрать из существующих",
|
||||
"collapseAll": "Свернуть все",
|
||||
"editLink": "Редактировать ссылку",
|
||||
"editRelationship": "Редактировать Отношения",
|
||||
"itemsAndMore": "{{items}} и ещё {{count}}",
|
||||
"latitude": "Широта",
|
||||
"longitude": "Долгота",
|
||||
"passwordsDoNotMatch": "Пароли не совпадают.",
|
||||
"removeUpload": "Удалить загруженное",
|
||||
"saveChanges": "Сохранить изменения",
|
||||
"searchForBlock": "Найти Блок",
|
||||
"selectFieldsToEdit": "Выберите поля для редактирования",
|
||||
"showAll": "Показать все",
|
||||
"swapRelationship": "Поменять отношения",
|
||||
"swapUpload": "Заменить загруженное",
|
||||
"uploadNewLabel": "Загрузить новый {{label}}"
|
||||
},
|
||||
"general": {
|
||||
|
||||
5
packages/translations/dist/client/sv.json
vendored
@@ -57,20 +57,25 @@
|
||||
"addLink": "Lägg till Länk",
|
||||
"addNew": "Lägg till ny",
|
||||
"addNewLabel": "Lägg till ny {{label}}",
|
||||
"addUpload": "Lägg till Uppladdning",
|
||||
"block": "block",
|
||||
"blockType": "Block Typ",
|
||||
"blocks": "block",
|
||||
"chooseFromExisting": "Välj bland befintliga",
|
||||
"collapseAll": "kollapsa Alla",
|
||||
"editLink": "Redigera Länk",
|
||||
"editRelationship": "Redigera Relation",
|
||||
"itemsAndMore": "{{items}} och {{count}} mer",
|
||||
"latitude": "Latitud",
|
||||
"longitude": "Longitud",
|
||||
"passwordsDoNotMatch": "Lösenorden matchar inte.",
|
||||
"removeUpload": "Ta Bort Uppladdning",
|
||||
"saveChanges": "Spara ändringar",
|
||||
"searchForBlock": "Sök efter ett block",
|
||||
"selectFieldsToEdit": "Välj fält att redigera",
|
||||
"showAll": "Visa Alla",
|
||||
"swapRelationship": "Byt Förhållande",
|
||||
"swapUpload": "Byt Uppladdning",
|
||||
"uploadNewLabel": "Ladda upp ny {{label}}"
|
||||
},
|
||||
"general": {
|
||||
|
||||
5
packages/translations/dist/client/th.json
vendored
@@ -57,20 +57,25 @@
|
||||
"addLink": "เพิ่มลิงค์",
|
||||
"addNew": "เพิ่ม",
|
||||
"addNewLabel": "เพิ่ม {{label}} ใหม่",
|
||||
"addUpload": "เพิ่มการอัปโหลด",
|
||||
"block": "Block",
|
||||
"blockType": "ประเภท Block",
|
||||
"blocks": "Blocks",
|
||||
"chooseFromExisting": "เลือกจากที่มีอยู่",
|
||||
"collapseAll": "ยุบทั้งหมด",
|
||||
"editLink": "แก้ไขลิงก์",
|
||||
"editRelationship": "แก้ไขความสัมพันธ์",
|
||||
"itemsAndMore": "{{items}} และเพิ่มเติมอีก {{count}}",
|
||||
"latitude": "ละติจูด",
|
||||
"longitude": "ลองติจูด",
|
||||
"passwordsDoNotMatch": "รหัสผ่านไม่ตรงกัน",
|
||||
"removeUpload": "ลบอัปโหลด",
|
||||
"saveChanges": "บันทึก",
|
||||
"searchForBlock": "ค้นหา Block",
|
||||
"selectFieldsToEdit": "เลือกช่องที่จะแก้ไข",
|
||||
"showAll": "แสดงทั้งหมด",
|
||||
"swapRelationship": "สลับความสัมพันธ์",
|
||||
"swapUpload": "สลับอัปโหลด",
|
||||
"uploadNewLabel": "อัปโหลด {{label}} ใหม่"
|
||||
},
|
||||
"general": {
|
||||
|
||||
5
packages/translations/dist/client/tr.json
vendored
@@ -57,20 +57,25 @@
|
||||
"addLink": "Link Ekle",
|
||||
"addNew": "Yeni",
|
||||
"addNewLabel": "Yeni {{label}}",
|
||||
"addUpload": "Yükleme Ekle",
|
||||
"block": "blok",
|
||||
"blockType": "Blok tipi",
|
||||
"blocks": "blok",
|
||||
"chooseFromExisting": "Varolanlardan seç",
|
||||
"collapseAll": "Tümünü daralt",
|
||||
"editLink": "Bağlantıyı Düzenle",
|
||||
"editRelationship": "İlişkiyi Ekle",
|
||||
"itemsAndMore": "{{items}} and {{count}} more",
|
||||
"latitude": "Enlem",
|
||||
"longitude": "Boylam",
|
||||
"passwordsDoNotMatch": "Parolalar eşleşmiyor.",
|
||||
"removeUpload": "Dosyayı Sil",
|
||||
"saveChanges": "Değişiklikleri kaydet",
|
||||
"searchForBlock": "Blok ara",
|
||||
"selectFieldsToEdit": "Düzenlenecek alanları seçin",
|
||||
"showAll": "Tümünü göster",
|
||||
"swapRelationship": "Takas Ilişkisi",
|
||||
"swapUpload": "Karşıya Yüklemeyi Değiştir",
|
||||
"uploadNewLabel": "Karşıya {{label}} yükle"
|
||||
},
|
||||
"general": {
|
||||
|
||||
@@ -280,6 +280,21 @@
|
||||
},
|
||||
"uploadNewLabel": {
|
||||
"type": "string"
|
||||
},
|
||||
"swapUpload": {
|
||||
"type": "string"
|
||||
},
|
||||
"addUpload": {
|
||||
"type": "string"
|
||||
},
|
||||
"editRelationship": {
|
||||
"type": "string"
|
||||
},
|
||||
"removeUpload": {
|
||||
"type": "string"
|
||||
},
|
||||
"saveChanges": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -301,7 +316,12 @@
|
||||
"selectFieldsToEdit",
|
||||
"showAll",
|
||||
"swapRelationship",
|
||||
"uploadNewLabel"
|
||||
"uploadNewLabel",
|
||||
"swapUpload",
|
||||
"addUpload",
|
||||
"editRelationship",
|
||||
"removeUpload",
|
||||
"saveChanges"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
|
||||
5
packages/translations/dist/client/ua.json
vendored
@@ -57,20 +57,25 @@
|
||||
"addLink": "Додати посилання",
|
||||
"addNew": "Додати новий",
|
||||
"addNewLabel": "Створити {{label}}",
|
||||
"addUpload": "Додати завантаження",
|
||||
"block": "блок",
|
||||
"blockType": "Тип блока",
|
||||
"blocks": "блоки",
|
||||
"chooseFromExisting": "Вибрати з існуючих",
|
||||
"collapseAll": "Згорнути все",
|
||||
"editLink": "Редагувати посилання",
|
||||
"editRelationship": "Редагувати взаємозв'язок",
|
||||
"itemsAndMore": "{{items}} і ще {{count}}",
|
||||
"latitude": "Широта",
|
||||
"longitude": "Довгота",
|
||||
"passwordsDoNotMatch": "Паролі не співпадають.",
|
||||
"removeUpload": "Видалити завантаження",
|
||||
"saveChanges": "Зберегти зміни",
|
||||
"searchForBlock": "Знайти блок",
|
||||
"selectFieldsToEdit": "Виберіть поля для редагування",
|
||||
"showAll": "Показати все",
|
||||
"swapRelationship": "Замінити зв'язок",
|
||||
"swapUpload": "Замінити завантаження",
|
||||
"uploadNewLabel": "Завантажити новий {{label}}"
|
||||
},
|
||||
"general": {
|
||||
|
||||
5
packages/translations/dist/client/vi.json
vendored
@@ -57,20 +57,25 @@
|
||||
"addLink": "Thêm liên kết",
|
||||
"addNew": "Thêm mới",
|
||||
"addNewLabel": "Thêm mới: {{label}}",
|
||||
"addUpload": "Thêm tải lên (upload)",
|
||||
"block": "block",
|
||||
"blockType": "Block Type",
|
||||
"blocks": "blocks",
|
||||
"chooseFromExisting": "Chọn từ thư viện",
|
||||
"collapseAll": "Ẩn toàn bộ",
|
||||
"editLink": "Chỉnh sửa liên kết",
|
||||
"editRelationship": "Chỉnh sửa mối quan hệ",
|
||||
"itemsAndMore": "{{items}} và {{count}} món nữa",
|
||||
"latitude": "Vĩ độ",
|
||||
"longitude": "Kinh độ",
|
||||
"passwordsDoNotMatch": "Mật khẩu không trùng.",
|
||||
"removeUpload": "Xóa bản tải lên",
|
||||
"saveChanges": "Luu thay đổi",
|
||||
"searchForBlock": "Tìm block",
|
||||
"selectFieldsToEdit": "Chọn các trường để chỉnh sửa",
|
||||
"showAll": "Hiển thị toàn bộ",
|
||||
"swapRelationship": "Đổi quan hệ",
|
||||
"swapUpload": "Đổi bản tải lên",
|
||||
"uploadNewLabel": "Tải lên bản mới: {{label}}"
|
||||
},
|
||||
"general": {
|
||||
|
||||
5
packages/translations/dist/client/zh-tw.json
vendored
@@ -59,20 +59,25 @@
|
||||
"addLink": "新增連結",
|
||||
"addNew": "新增",
|
||||
"addNewLabel": "新增{{label}}",
|
||||
"addUpload": "上傳",
|
||||
"block": "區塊",
|
||||
"blockType": "區塊類型",
|
||||
"blocks": "區塊",
|
||||
"chooseFromExisting": "從現有的選擇",
|
||||
"collapseAll": "全部折疊",
|
||||
"editLink": "編輯連結",
|
||||
"editRelationship": "編輯關聯",
|
||||
"itemsAndMore": "{{items}} 個,還有 {{count}} 個",
|
||||
"latitude": "緯度",
|
||||
"longitude": "經度",
|
||||
"passwordsDoNotMatch": "密碼不匹配。",
|
||||
"removeUpload": "移除上傳",
|
||||
"saveChanges": "儲存變更",
|
||||
"searchForBlock": "搜尋一個區塊",
|
||||
"selectFieldsToEdit": "選擇要編輯的字串",
|
||||
"showAll": "顯示全部",
|
||||
"swapRelationship": "替換關聯",
|
||||
"swapUpload": "替換上傳",
|
||||
"uploadNewLabel": "上傳新的{{label}}"
|
||||
},
|
||||
"general": {
|
||||
|
||||
5
packages/translations/dist/client/zh.json
vendored
@@ -57,20 +57,25 @@
|
||||
"addLink": "添加链接",
|
||||
"addNew": "添加新的",
|
||||
"addNewLabel": "添加新的{{label}}",
|
||||
"addUpload": "添加上传",
|
||||
"block": "区块",
|
||||
"blockType": "区块类型",
|
||||
"blocks": "区块",
|
||||
"chooseFromExisting": "从现有中选择",
|
||||
"collapseAll": "全部折叠",
|
||||
"editLink": "编辑链接",
|
||||
"editRelationship": "编辑关系",
|
||||
"itemsAndMore": "{{items}}和{{count}}更多",
|
||||
"latitude": "纬度",
|
||||
"longitude": "经度",
|
||||
"passwordsDoNotMatch": "密码不匹配。",
|
||||
"removeUpload": "移除上传",
|
||||
"saveChanges": "保存更改",
|
||||
"searchForBlock": "搜索一个区块",
|
||||
"selectFieldsToEdit": "选择要编辑的字段",
|
||||
"showAll": "显示全部",
|
||||
"swapRelationship": "交换关系",
|
||||
"swapUpload": "交换上传",
|
||||
"uploadNewLabel": "上传新的{{label}}"
|
||||
},
|
||||
"general": {
|
||||
|
||||
@@ -151,6 +151,11 @@ const clientTranslationKeys = [
|
||||
'fields:showAll',
|
||||
'fields:swapRelationship',
|
||||
'fields:uploadNewLabel',
|
||||
'fields:swapUpload',
|
||||
'fields:addUpload',
|
||||
'fields:editRelationship',
|
||||
'fields:removeUpload',
|
||||
'fields:saveChanges',
|
||||
|
||||
'general:aboutToDeleteCount',
|
||||
'general:aboutToDelete',
|
||||
|
||||
@@ -20,7 +20,7 @@ export type DocumentTogglerProps = HTMLAttributes<HTMLButtonElement> & {
|
||||
id?: string
|
||||
}
|
||||
|
||||
export type UseDocumentDrawer = (args: { collectionSlug: string; id?: string }) => [
|
||||
export type UseDocumentDrawer = (args: { collectionSlug: string; id?: string | number }) => [
|
||||
React.FC<Omit<DocumentDrawerProps, 'collectionSlug' | 'id'>>, // drawer
|
||||
React.FC<Omit<DocumentTogglerProps, 'collectionSlug' | 'id'>>, // toggler
|
||||
{
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
import path from 'path'
|
||||
|
||||
import type { CollectionConfig } from '../../../../packages/payload/src/collections/config/types'
|
||||
|
||||
export const mediaSlug = 'media'
|
||||
|
||||
export const MediaCollection: CollectionConfig = {
|
||||
slug: mediaSlug,
|
||||
// upload: {
|
||||
// staticDir: path.resolve(__dirname, './media'),
|
||||
// },
|
||||
upload: true,
|
||||
access: {
|
||||
read: () => true,
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
import path from 'path'
|
||||
|
||||
import getFileByPath from '../../packages/payload/src/uploads/getFileByPath'
|
||||
import { buildConfigWithDefaults } from '../buildConfigWithDefaults'
|
||||
import { devUser } from '../credentials'
|
||||
import { MediaCollection } from './collections/Media'
|
||||
@@ -34,5 +37,15 @@ export default buildConfigWithDefaults({
|
||||
text: 'example post',
|
||||
},
|
||||
})
|
||||
|
||||
// Create image
|
||||
const imageFilePath = path.resolve(process.cwd(), './test/uploads/image.png')
|
||||
const imageFile = await getFileByPath(imageFilePath)
|
||||
|
||||
const { id: uploadedImage } = await payload.create({
|
||||
collection: 'media',
|
||||
data: {},
|
||||
file: imageFile,
|
||||
})
|
||||
},
|
||||
})
|
||||
|
||||
@@ -25,7 +25,22 @@ const databaseAdapters = {
|
||||
export function buildConfigWithDefaults(testConfig?: Partial<Config>): Promise<SanitizedConfig> {
|
||||
const config: Config = {
|
||||
secret: 'TEST_SECRET',
|
||||
editor: slateEditor({}),
|
||||
editor: slateEditor({
|
||||
admin: {
|
||||
upload: {
|
||||
collections: {
|
||||
media: {
|
||||
fields: [
|
||||
{
|
||||
name: 'alt',
|
||||
type: 'text',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
rateLimit: {
|
||||
max: 9999999999,
|
||||
window: 15 * 60 * 1000, // 15min default,
|
||||
|
||||