Merge branch 'master' of https://github.com/payloadcms/payload into feat/1695-nullable-localized-array-and-blocks
This commit is contained in:
@@ -58,13 +58,16 @@ const shouldIncludeCollection = ({
|
||||
collectionSlugs,
|
||||
}) => (enableRichTextRelationship && ((uploads && Boolean(upload)) || collectionSlugs?.includes(slug)));
|
||||
|
||||
export const ListDrawerContent: React.FC<ListDrawerProps> = ({
|
||||
const DrawerContent: React.FC<ListDrawerProps & {
|
||||
enabledCollectionConfigs: SanitizedCollectionConfig[]
|
||||
}> = ({
|
||||
drawerSlug,
|
||||
onSelect,
|
||||
customHeader,
|
||||
collectionSlugs,
|
||||
uploads,
|
||||
selectedCollection,
|
||||
enabledCollectionConfigs
|
||||
}) => {
|
||||
const { t, i18n } = useTranslation(['upload', 'general']);
|
||||
const { permissions } = useAuth();
|
||||
@@ -75,7 +78,7 @@ export const ListDrawerContent: React.FC<ListDrawerProps> = ({
|
||||
const [page, setPage] = useState(1);
|
||||
const [where, setWhere] = useState(null);
|
||||
const { serverURL, routes: { api }, collections } = useConfig();
|
||||
const [enabledCollectionConfigs] = useState(() => collections.filter((coll) => shouldIncludeCollection({ coll, uploads, collectionSlugs })));
|
||||
|
||||
const [selectedCollectionConfig, setSelectedCollectionConfig] = useState<SanitizedCollectionConfig>(() => {
|
||||
let initialSelection: SanitizedCollectionConfig;
|
||||
if (selectedCollection) {
|
||||
@@ -92,7 +95,9 @@ export const ListDrawerContent: React.FC<ListDrawerProps> = ({
|
||||
});
|
||||
|
||||
const [selectedOption, setSelectedOption] = useState<{ label: string, value: string }>(() => (selectedCollectionConfig ? { label: getTranslation(selectedCollectionConfig.labels.singular, i18n), value: selectedCollectionConfig.slug } : undefined));
|
||||
|
||||
const [fields, setFields] = useState<Field[]>(() => formatFields(selectedCollectionConfig, t));
|
||||
|
||||
const [tableColumns, setTableColumns] = useState<Column[]>(() => {
|
||||
const initialColumns = getInitialColumnState(fields, selectedCollectionConfig.admin.useAsTitle, selectedCollectionConfig.admin.defaultColumns);
|
||||
return buildColumns({
|
||||
@@ -308,3 +313,25 @@ export const ListDrawerContent: React.FC<ListDrawerProps> = ({
|
||||
</Fragment>
|
||||
);
|
||||
};
|
||||
|
||||
export const ListDrawerContent: React.FC<ListDrawerProps> = (props) => {
|
||||
const {
|
||||
collectionSlugs,
|
||||
uploads,
|
||||
} = props;
|
||||
|
||||
const { collections } = useConfig();
|
||||
|
||||
const [enabledCollectionConfigs] = useState(() => collections.filter((coll) => shouldIncludeCollection({ coll, uploads, collectionSlugs })));
|
||||
|
||||
if (enabledCollectionConfigs.length === 0){
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<DrawerContent
|
||||
{...props}
|
||||
enabledCollectionConfigs={enabledCollectionConfigs}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -29,6 +29,12 @@
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
&--within-row {
|
||||
margin: 0;
|
||||
border-top: 0;
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
&--within-tab:first-child {
|
||||
margin-top: 0;
|
||||
border-top: 0;
|
||||
@@ -80,4 +86,8 @@
|
||||
|
||||
.group-field--within-collapsible+.group-field--within-collapsible {
|
||||
margin-top: base(-1);
|
||||
}
|
||||
}
|
||||
|
||||
.group-field--within-row+.group-field--within-row {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import FieldDescription from '../../FieldDescription';
|
||||
import { Props } from './types';
|
||||
import { useCollapsible } from '../../../elements/Collapsible/provider';
|
||||
import { GroupProvider, useGroup } from './provider';
|
||||
import { useRow } from '../Row/provider';
|
||||
import { useTabs } from '../Tabs/provider';
|
||||
import { getTranslation } from '../../../../../utilities/getTranslation';
|
||||
import { createNestedFieldPath } from '../../Form/createNestedFieldPath';
|
||||
@@ -35,6 +36,7 @@ const Group: React.FC<Props> = (props) => {
|
||||
|
||||
const isWithinCollapsible = useCollapsible();
|
||||
const isWithinGroup = useGroup();
|
||||
const isWithinRow = useRow();
|
||||
const isWithinTab = useTabs();
|
||||
const { i18n } = useTranslation();
|
||||
|
||||
@@ -48,6 +50,7 @@ const Group: React.FC<Props> = (props) => {
|
||||
baseClass,
|
||||
isWithinCollapsible && `${baseClass}--within-collapsible`,
|
||||
isWithinGroup && `${baseClass}--within-group`,
|
||||
isWithinRow && `${baseClass}--within-row`,
|
||||
isWithinTab && `${baseClass}--within-tab`,
|
||||
(!hideGutter && isWithinGroup) && `${baseClass}--gutter`,
|
||||
className,
|
||||
|
||||
@@ -3,6 +3,7 @@ import RenderFields from '../../RenderFields';
|
||||
import withCondition from '../../withCondition';
|
||||
import { Props } from './types';
|
||||
import { createNestedFieldPath } from '../../Form/createNestedFieldPath';
|
||||
import { RowProvider } from './provider';
|
||||
|
||||
import './index.scss';
|
||||
|
||||
@@ -26,17 +27,19 @@ const Row: React.FC<Props> = (props) => {
|
||||
].filter(Boolean).join(' ');
|
||||
|
||||
return (
|
||||
<RenderFields
|
||||
readOnly={readOnly}
|
||||
className={classes}
|
||||
permissions={permissions}
|
||||
fieldTypes={fieldTypes}
|
||||
indexPath={indexPath}
|
||||
fieldSchema={fields.map((field) => ({
|
||||
...field,
|
||||
path: createNestedFieldPath(path, field),
|
||||
}))}
|
||||
/>
|
||||
<RowProvider>
|
||||
<RenderFields
|
||||
readOnly={readOnly}
|
||||
className={classes}
|
||||
permissions={permissions}
|
||||
fieldTypes={fieldTypes}
|
||||
indexPath={indexPath}
|
||||
fieldSchema={fields.map((field) => ({
|
||||
...field,
|
||||
path: createNestedFieldPath(path, field),
|
||||
}))}
|
||||
/>
|
||||
</RowProvider>
|
||||
);
|
||||
};
|
||||
export default withCondition(Row);
|
||||
|
||||
17
src/admin/components/forms/field-types/Row/provider.tsx
Normal file
17
src/admin/components/forms/field-types/Row/provider.tsx
Normal file
@@ -0,0 +1,17 @@
|
||||
import React, {
|
||||
createContext, useContext,
|
||||
} from 'react';
|
||||
|
||||
const Context = createContext(false);
|
||||
|
||||
export const RowProvider: React.FC<{ children?: React.ReactNode, withinRow?: boolean }> = ({ children, withinRow = true }) => {
|
||||
return (
|
||||
<Context.Provider value={withinRow}>
|
||||
{children}
|
||||
</Context.Provider>
|
||||
);
|
||||
};
|
||||
|
||||
export const useRow = (): boolean => useContext(Context);
|
||||
|
||||
export default Context;
|
||||
@@ -5,11 +5,11 @@ import Logger from '../utilities/logger';
|
||||
import loadConfig from '../config/load';
|
||||
import payload from '..';
|
||||
|
||||
export function generateGraphQLSchema(): void {
|
||||
export async function generateGraphQLSchema(): Promise<void> {
|
||||
const logger = Logger();
|
||||
const config = loadConfig();
|
||||
|
||||
payload.init({
|
||||
await payload.init({
|
||||
secret: '--unused--',
|
||||
mongoURL: false,
|
||||
local: true,
|
||||
|
||||
@@ -108,6 +108,7 @@ export type InitOptions = {
|
||||
* See Pino Docs for options: https://getpino.io/#/docs/api?id=options
|
||||
*/
|
||||
loggerOptions?: LoggerOptions;
|
||||
config?: SanitizedConfig
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -297,7 +297,7 @@ export type ValueWithRelation = {
|
||||
}
|
||||
|
||||
export function valueIsValueWithRelation(value: unknown): value is ValueWithRelation {
|
||||
return typeof value === 'object' && 'relationTo' in value && 'value' in value;
|
||||
return value !== null && typeof value === 'object' && 'relationTo' in value && 'value' in value;
|
||||
}
|
||||
|
||||
export type RelationshipValue = (string | number)
|
||||
|
||||
@@ -5,9 +5,17 @@
|
||||
* Otherwise, return an empty object.
|
||||
*/
|
||||
|
||||
export const getExistingRowDoc = (incomingRow: Record<string, unknown>, existingRow?: Record<string, unknown>): Record<string, unknown> => {
|
||||
if (incomingRow.id && incomingRow.id === existingRow?.id) {
|
||||
return existingRow;
|
||||
export const getExistingRowDoc = (incomingRow: Record<string, unknown>, existingRows?: unknown): Record<string, unknown> => {
|
||||
if (incomingRow.id && Array.isArray(existingRows)) {
|
||||
const matchedExistingRow = existingRows.find((existingRow) => {
|
||||
if (typeof existingRow === 'object' && 'id' in existingRow) {
|
||||
if (existingRow.id === incomingRow.id) return existingRow;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
if (matchedExistingRow) return matchedExistingRow;
|
||||
}
|
||||
|
||||
return {};
|
||||
|
||||
@@ -230,8 +230,8 @@ export const promise = async ({
|
||||
path: `${path}${field.name}.${i}.`,
|
||||
req,
|
||||
siblingData: row,
|
||||
siblingDoc: getExistingRowDoc(row, siblingDoc[field.name]?.[i]),
|
||||
siblingDocWithLocales: getExistingRowDoc(row, siblingDocWithLocales[field.name]?.[i]),
|
||||
siblingDoc: getExistingRowDoc(row, siblingDoc[field.name]),
|
||||
siblingDocWithLocales: getExistingRowDoc(row, siblingDocWithLocales[field.name]),
|
||||
skipValidation: skipValidationFromHere,
|
||||
}));
|
||||
});
|
||||
@@ -263,8 +263,8 @@ export const promise = async ({
|
||||
path: `${path}${field.name}.${i}.`,
|
||||
req,
|
||||
siblingData: row,
|
||||
siblingDoc: getExistingRowDoc(row, siblingDoc[field.name]?.[i]),
|
||||
siblingDocWithLocales: getExistingRowDoc(row, siblingDocWithLocales[field.name]?.[i]),
|
||||
siblingDoc: getExistingRowDoc(row, siblingDoc[field.name]),
|
||||
siblingDocWithLocales: getExistingRowDoc(row, siblingDocWithLocales[field.name]),
|
||||
skipValidation: skipValidationFromHere,
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -89,18 +89,19 @@ export type GlobalConfig = {
|
||||
}
|
||||
}
|
||||
|
||||
export interface SanitizedGlobalConfig extends Omit<DeepRequired<GlobalConfig>, 'fields' | 'versions' | 'graphQL'> {
|
||||
export interface SanitizedGlobalConfig extends Omit<DeepRequired<GlobalConfig>, 'fields' | 'versions'> {
|
||||
fields: Field[]
|
||||
versions: SanitizedGlobalVersions
|
||||
graphQL?: {
|
||||
name?: string
|
||||
type: GraphQLObjectType
|
||||
mutationInputType: GraphQLNonNull<any>
|
||||
versionType?: GraphQLObjectType
|
||||
}
|
||||
}
|
||||
|
||||
export type Globals = {
|
||||
Model: GlobalModel
|
||||
config: SanitizedGlobalConfig[]
|
||||
graphQL?: {
|
||||
[slug: string]: {
|
||||
type: GraphQLObjectType
|
||||
mutationInputType: GraphQLNonNull<any>
|
||||
versionType?: GraphQLObjectType
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,27 +30,28 @@ function initGlobalsGraphQL(payload: Payload): void {
|
||||
|
||||
const formattedName = global.graphQL?.name ? global.graphQL.name : singular(toWords(global.slug, true));
|
||||
|
||||
global.graphQL = {} as SanitizedGlobalConfig['graphQL'];
|
||||
|
||||
const forceNullableObjectType = Boolean(versions?.drafts);
|
||||
|
||||
global.graphQL.type = buildObjectType({
|
||||
payload,
|
||||
name: formattedName,
|
||||
parentName: formattedName,
|
||||
fields,
|
||||
forceNullable: forceNullableObjectType,
|
||||
});
|
||||
if (!payload.globals.graphQL) payload.globals.graphQL = {};
|
||||
|
||||
global.graphQL.mutationInputType = new GraphQLNonNull(buildMutationInputType(
|
||||
payload,
|
||||
formattedName,
|
||||
fields,
|
||||
formattedName,
|
||||
));
|
||||
payload.globals.graphQL[slug] = {
|
||||
type: buildObjectType({
|
||||
payload,
|
||||
name: formattedName,
|
||||
parentName: formattedName,
|
||||
fields,
|
||||
forceNullable: forceNullableObjectType,
|
||||
}),
|
||||
mutationInputType: new GraphQLNonNull(buildMutationInputType(
|
||||
payload,
|
||||
formattedName,
|
||||
fields,
|
||||
formattedName,
|
||||
)),
|
||||
};
|
||||
|
||||
payload.Query.fields[formattedName] = {
|
||||
type: global.graphQL.type,
|
||||
type: payload.globals.graphQL[slug].type,
|
||||
args: {
|
||||
draft: { type: GraphQLBoolean },
|
||||
...(payload.config.localization ? {
|
||||
@@ -62,9 +63,9 @@ function initGlobalsGraphQL(payload: Payload): void {
|
||||
};
|
||||
|
||||
payload.Mutation.fields[`update${formattedName}`] = {
|
||||
type: global.graphQL.type,
|
||||
type: payload.globals.graphQL[slug].type,
|
||||
args: {
|
||||
data: { type: global.graphQL.mutationInputType },
|
||||
data: { type: payload.globals.graphQL[slug].mutationInputType },
|
||||
draft: { type: GraphQLBoolean },
|
||||
...(payload.config.localization ? {
|
||||
locale: { type: payload.types.localeInputType },
|
||||
@@ -102,7 +103,7 @@ function initGlobalsGraphQL(payload: Payload): void {
|
||||
},
|
||||
];
|
||||
|
||||
global.graphQL.versionType = buildObjectType({
|
||||
payload.globals.graphQL[slug].versionType = buildObjectType({
|
||||
payload,
|
||||
name: `${formattedName}Version`,
|
||||
parentName: `${formattedName}Version`,
|
||||
@@ -111,7 +112,7 @@ function initGlobalsGraphQL(payload: Payload): void {
|
||||
});
|
||||
|
||||
payload.Query.fields[`version${formatName(formattedName)}`] = {
|
||||
type: global.graphQL.versionType,
|
||||
type: payload.globals.graphQL[slug].versionType,
|
||||
args: {
|
||||
id: { type: GraphQLString },
|
||||
...(payload.config.localization ? {
|
||||
@@ -122,7 +123,7 @@ function initGlobalsGraphQL(payload: Payload): void {
|
||||
resolve: findVersionByIDResolver(global),
|
||||
};
|
||||
payload.Query.fields[`versions${formattedName}`] = {
|
||||
type: buildPaginatedListType(`versions${formatName(formattedName)}`, global.graphQL.versionType),
|
||||
type: buildPaginatedListType(`versions${formatName(formattedName)}`, payload.globals.graphQL[slug].versionType),
|
||||
args: {
|
||||
where: {
|
||||
type: buildWhereInputType(
|
||||
@@ -142,7 +143,7 @@ function initGlobalsGraphQL(payload: Payload): void {
|
||||
resolve: findVersionsResolver(global),
|
||||
};
|
||||
payload.Mutation.fields[`restoreVersion${formatName(formattedName)}`] = {
|
||||
type: global.graphQL.type,
|
||||
type: payload.globals.graphQL[slug].type,
|
||||
args: {
|
||||
id: { type: GraphQLString },
|
||||
},
|
||||
|
||||
10
src/index.ts
10
src/index.ts
@@ -44,7 +44,7 @@ import { Result as ResetPasswordResult } from './auth/operations/resetPassword';
|
||||
import { Result as LoginResult } from './auth/operations/login';
|
||||
import { Options as FindGlobalOptions } from './globals/operations/local/findOne';
|
||||
import { Options as UpdateGlobalOptions } from './globals/operations/local/update';
|
||||
import { initSync, initAsync } from './init';
|
||||
import { initPayload } from './init';
|
||||
|
||||
require('isomorphic-fetch');
|
||||
|
||||
@@ -121,12 +121,8 @@ export class Payload {
|
||||
* @description Initializes Payload
|
||||
* @param options
|
||||
*/
|
||||
init(options: InitOptions): void {
|
||||
initSync(this, options);
|
||||
}
|
||||
|
||||
async initAsync(options: InitOptions): Promise<void> {
|
||||
await initAsync(this, options);
|
||||
async init(options: InitOptions): Promise<void> {
|
||||
await initPayload(this, options);
|
||||
}
|
||||
|
||||
getAdminURL = (): string => `${this.config.serverURL}${this.config.routes.admin}`;
|
||||
|
||||
55
src/init.ts
55
src/init.ts
@@ -1,6 +1,7 @@
|
||||
/* eslint-disable no-param-reassign */
|
||||
import express, { NextFunction, Response } from 'express';
|
||||
import crypto from 'crypto';
|
||||
import path from 'path';
|
||||
import mongoose from 'mongoose';
|
||||
import { InitOptions } from './config/types';
|
||||
|
||||
@@ -30,8 +31,17 @@ import Logger from './utilities/logger';
|
||||
import { getDataLoader } from './collections/dataloader';
|
||||
import mountEndpoints from './express/mountEndpoints';
|
||||
import PreferencesModel from './preferences/model';
|
||||
import findConfig from './config/find';
|
||||
|
||||
export const initPayload = async (payload: Payload, options: InitOptions): Promise<void> => {
|
||||
payload.logger = Logger('payload', options.loggerOptions);
|
||||
payload.mongoURL = options.mongoURL;
|
||||
|
||||
if (payload.mongoURL) {
|
||||
mongoose.set('strictQuery', false);
|
||||
payload.mongoMemoryServer = await connectMongoose(payload.mongoURL, options.mongoOptions, payload.logger);
|
||||
}
|
||||
|
||||
export const init = (payload: Payload, options: InitOptions): void => {
|
||||
payload.logger.info('Starting Payload...');
|
||||
if (!options.secret) {
|
||||
throw new Error(
|
||||
@@ -52,7 +62,21 @@ export const init = (payload: Payload, options: InitOptions): void => {
|
||||
|
||||
payload.local = options.local;
|
||||
|
||||
payload.config = loadConfig(payload.logger);
|
||||
if (options.config) {
|
||||
payload.config = options.config;
|
||||
const configPath = findConfig();
|
||||
|
||||
payload.config = {
|
||||
...options.config,
|
||||
paths: {
|
||||
configDir: path.dirname(configPath),
|
||||
config: configPath,
|
||||
rawConfig: configPath,
|
||||
},
|
||||
};
|
||||
} else {
|
||||
payload.config = loadConfig(payload.logger);
|
||||
}
|
||||
|
||||
// If not initializing locally, scaffold router
|
||||
if (!payload.local) {
|
||||
@@ -129,34 +153,7 @@ export const init = (payload: Payload, options: InitOptions): void => {
|
||||
}
|
||||
|
||||
serverInitTelemetry(payload);
|
||||
};
|
||||
|
||||
export const initAsync = async (payload: Payload, options: InitOptions): Promise<void> => {
|
||||
payload.logger = Logger('payload', options.loggerOptions);
|
||||
payload.mongoURL = options.mongoURL;
|
||||
|
||||
if (payload.mongoURL) {
|
||||
mongoose.set('strictQuery', false);
|
||||
payload.mongoMemoryServer = await connectMongoose(payload.mongoURL, options.mongoOptions, payload.logger);
|
||||
}
|
||||
|
||||
init(payload, options);
|
||||
|
||||
if (typeof options.onInit === 'function') await options.onInit(payload);
|
||||
if (typeof payload.config.onInit === 'function') await payload.config.onInit(payload);
|
||||
};
|
||||
|
||||
export const initSync = (payload: Payload, options: InitOptions): void => {
|
||||
payload.logger = Logger('payload', options.loggerOptions);
|
||||
payload.mongoURL = options.mongoURL;
|
||||
|
||||
if (payload.mongoURL) {
|
||||
mongoose.set('strictQuery', false);
|
||||
connectMongoose(payload.mongoURL, options.mongoOptions, payload.logger);
|
||||
}
|
||||
|
||||
init(payload, options);
|
||||
|
||||
if (typeof options.onInit === 'function') options.onInit(payload);
|
||||
if (typeof payload.config.onInit === 'function') payload.config.onInit(payload);
|
||||
};
|
||||
|
||||
@@ -20,10 +20,10 @@
|
||||
"forceUnlock": "Forcer le déverrouillage",
|
||||
"forgotPassword": "Mot de passe oublié",
|
||||
"forgotPasswordEmailInstructions": "Veuillez saisir votre e-mail ci-dessous. Vous recevrez un e-mail avec des instructions concernant comment réinitialiser votre mot de passe.",
|
||||
"forgotPasswordQuestion": "Mot de passe oublié?",
|
||||
"forgotPasswordQuestion": "Mot de passe oublié ?",
|
||||
"generate": "Générer",
|
||||
"generateNewAPIKey": "Générer une nouvelle clé API",
|
||||
"generatingNewAPIKeyWillInvalidate": "La génération d'une nouvelle clé API <1>invalidera</1> la clé précédente. Êtes-vous sûr de vouloir continuer?",
|
||||
"generatingNewAPIKeyWillInvalidate": "La génération d'une nouvelle clé API <1>invalidera</1> la clé précédente. Êtes-vous sûr de vouloir continuer ?",
|
||||
"lockUntil": "Verrouiller jusqu'à",
|
||||
"logBackIn": "Se reconnecter",
|
||||
"logOut": "Se déconnecter",
|
||||
@@ -52,8 +52,8 @@
|
||||
"verify": "Vérifier",
|
||||
"verifyUser": "Vérifier l'utilisateur",
|
||||
"verifyYourEmail": "Vérifiez votre e-mail",
|
||||
"youAreInactive": "Vous n'avez pas été actif depuis un moment alors vous serez bientôt automatiquement déconnecté pour votre propre sécurité. Souhaitez-vous rester connecté ?",
|
||||
"youAreReceivingResetPassword": "Vous recevez ceci parce que vous (ou quelqu'un d'autre) avez demandé la réinitialisation du mot de passe de votre compte. Veuillez cliquer sur le lien suivant ou le coller dans votre navigateur pour terminer le processus:",
|
||||
"youAreInactive": "Vous n'avez pas été actif depuis un moment alors vous serez bientôt automatiquement déconnecté pour votre propre sécurité. Souhaitez-vous rester connecté ?",
|
||||
"youAreReceivingResetPassword": "Vous recevez ceci parce que vous (ou quelqu'un d'autre) avez demandé la réinitialisation du mot de passe de votre compte. Veuillez cliquer sur le lien suivant ou le coller dans votre navigateur pour terminer le processus :",
|
||||
"youDidNotRequestPassword": "Si vous ne l'avez pas demandé, veuillez ignorer cet e-mail et votre mot de passe restera inchangé."
|
||||
},
|
||||
"error": {
|
||||
@@ -63,11 +63,11 @@
|
||||
"deletingFile": "Une erreur s'est produite lors de la suppression du fichier.",
|
||||
"deletingTitle": "Une erreur s'est produite lors de la suppression de {{title}}. Veuillez vérifier votre connexion puis réessayer.",
|
||||
"emailOrPasswordIncorrect": "L'adresse e-mail ou le mot de passe fourni est incorrect.",
|
||||
"followingFieldsInvalid_many": "Les champs suivants ne sont pas valides:",
|
||||
"followingFieldsInvalid_one": "Le champ suivant n'est pas valide:",
|
||||
"followingFieldsInvalid_many": "Les champs suivants ne sont pas valides :",
|
||||
"followingFieldsInvalid_one": "Le champ suivant n'est pas valide :",
|
||||
"incorrectCollection": "Collection incorrecte",
|
||||
"invalidFileType": "Type de fichier invalide",
|
||||
"invalidFileTypeValue": "Type de fichier invalide: {{value}}",
|
||||
"invalidFileTypeValue": "Type de fichier invalide : {{value}}",
|
||||
"loadingDocument": "Un problème est survenu lors du chargement du document qui a pour identifiant {{id}}.",
|
||||
"missingEmail": "E-mail manquant.",
|
||||
"missingIDOfDocument": "Il manque l'identifiant du document à mettre à jour.",
|
||||
@@ -118,13 +118,13 @@
|
||||
"searchForBlock": "Rechercher un bloc",
|
||||
"selectExistingLabel": "Sélectionnez {{label}} existant",
|
||||
"showAll": "Afficher tout",
|
||||
"swapRelationship": "Relation D'échange",
|
||||
"swapRelationship": "Changer de relation",
|
||||
"swapUpload": "Changer de Fichier",
|
||||
"toggleBlock": "Bloc bascule",
|
||||
"uploadNewLabel": "Téléverser un(e) nouveau ou nouvelle {{label}}"
|
||||
},
|
||||
"general": {
|
||||
"aboutToDelete": "Vous êtes sur le point de supprimer ce ou cette {{label}} <1>{{title}}</1>. Êtes-vous sûr?",
|
||||
"aboutToDelete": "Vous êtes sur le point de supprimer ce ou cette {{label}} <1>{{title}}</1>. Êtes-vous sûr ?",
|
||||
"addBelow": "Ajoutez ci-dessous",
|
||||
"addFilter": "Ajouter un filtre",
|
||||
"adminTheme": "Thème d'administration",
|
||||
@@ -208,7 +208,7 @@
|
||||
"thisLanguage": "Français",
|
||||
"titleDeleted": "{{label}} \"{{title}}\" supprimé(e) avec succès.",
|
||||
"unauthorized": "Non autorisé",
|
||||
"unsavedChangesDuplicate": "Vous avez des changements non enregistrés. Souhaitez-vous continuer la duplication?",
|
||||
"unsavedChangesDuplicate": "Vous avez des changements non enregistrés. Souhaitez-vous continuer la duplication ?",
|
||||
"untitled": "Sans titre",
|
||||
"updatedAt": "Modifié le",
|
||||
"updatedSuccessfully": "Mis à jour avec succés.",
|
||||
@@ -236,7 +236,7 @@
|
||||
"greaterThanMax": "\"{{value}}\" est supérieur à la valeur maximale autorisée de {{max}}.",
|
||||
"invalidInput": "Ce champ a une entrée invalide.",
|
||||
"invalidSelection": "Ce champ a une sélection invalide.",
|
||||
"invalidSelections": "Ce champ contient des sélections invalides suivantes:",
|
||||
"invalidSelections": "Ce champ contient des sélections invalides suivantes :",
|
||||
"lessThanMin": "\"{{value}}\" est inférieur à la valeur minimale autorisée de {{min}}.",
|
||||
"longerThanMin": "Cette valeur doit être supérieure à la longueur minimale de {{minLength}} caractères.",
|
||||
"notValidDate": "\"{{value}}\" n'est pas une date valide.",
|
||||
@@ -251,13 +251,13 @@
|
||||
"version": {
|
||||
"aboutToRestore": "Vous êtes sur le point de restaurer le document {{label}} à l'état où il se trouvait le {{versionDate}}.",
|
||||
"aboutToRestoreGlobal": "Vous êtes sur le point de restaurer le ou la {{label}} global(e) à l'état où il ou elle se trouvait le {{versionDate}}.",
|
||||
"aboutToRevertToPublished": "Vous êtes sur le point de rétablir les modifications apportées à ce document à la version publiée. Êtes-vous sûr?",
|
||||
"aboutToUnpublish": "Vous êtes sur le point d'annuler la publication de ce document. Êtes-vous sûr?",
|
||||
"aboutToRevertToPublished": "Vous êtes sur le point de rétablir les modifications apportées à ce document à la version publiée. Êtes-vous sûr ?",
|
||||
"aboutToUnpublish": "Vous êtes sur le point d'annuler la publication de ce document. Êtes-vous sûr ?",
|
||||
"autosave": "Enregistrement automatique",
|
||||
"autosavedSuccessfully": "Enregistrement automatique réussi.",
|
||||
"autosavedVersion": "Version enregistrée automatiquement",
|
||||
"changed": "Modifié",
|
||||
"compareVersion": "Comparez cette version à:",
|
||||
"compareVersion": "Comparez cette version à :",
|
||||
"confirmRevertToSaved": "Confirmer la restauration",
|
||||
"confirmUnpublish": "Confirmer l'annulation",
|
||||
"confirmVersionRestoration": "Confirmer la restauration de la version",
|
||||
@@ -279,7 +279,7 @@
|
||||
"saveDraft": "Enregistrer le brouillon",
|
||||
"selectLocals": "Sélectionnez les paramètres régionaux à afficher",
|
||||
"selectVersionToCompare": "Sélectionnez une version à comparer",
|
||||
"showLocales": "Afficher les paramètres régionaux:",
|
||||
"showLocales": "Afficher les paramètres régionaux :",
|
||||
"status": "Statut",
|
||||
"type": "Type",
|
||||
"unpublish": "Annuler la publication",
|
||||
@@ -288,7 +288,7 @@
|
||||
"versionCount_many": "{{count}} versions trouvées",
|
||||
"versionCount_none": "Aucune version trouvée",
|
||||
"versionCount_one": "{{count}} version trouvée",
|
||||
"versionCreatedOn": "{{version}} créé(e) le:",
|
||||
"versionCreatedOn": "{{version}} créé(e) le :",
|
||||
"versionID": "Identifiant de la version",
|
||||
"versions": "Versions",
|
||||
"viewingVersion": "Affichage de la version de ou du {{entityLabel}} {{documentTitle}}",
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
"newPassword": "รหัสผ่านใหม่",
|
||||
"noFiltersSet": "ไม่มีการกรอง",
|
||||
"noLabel": "<ไม่มี {{label}}>",
|
||||
"noResults": "ไม่พบ {{label}} อาจเป็นเพราะยังไม่มี {{label}} หรือไม่มี {{label}} ใดตรงกับการกร้องด้านบน",
|
||||
"noResults": "ไม่พบ {{label}} เนื่องจากยังไม่มี {{label}} หรือไม่มี {{label}} ใดตรงกับการกรองด้านบน",
|
||||
"noValue": "ไม่มีค่า",
|
||||
"none": "ไม่มี",
|
||||
"notFound": "ไม่พบ",
|
||||
|
||||
@@ -21,7 +21,7 @@ const getBaseUploadFields = ({ config, collection }: Options): Field[] => {
|
||||
type: 'text',
|
||||
admin: {
|
||||
readOnly: true,
|
||||
disabled: true,
|
||||
hidden: true,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -31,7 +31,7 @@ const getBaseUploadFields = ({ config, collection }: Options): Field[] => {
|
||||
type: 'text',
|
||||
admin: {
|
||||
readOnly: true,
|
||||
disabled: true,
|
||||
hidden: true,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -41,7 +41,7 @@ const getBaseUploadFields = ({ config, collection }: Options): Field[] => {
|
||||
type: 'number',
|
||||
admin: {
|
||||
readOnly: true,
|
||||
disabled: true,
|
||||
hidden: true,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -51,7 +51,7 @@ const getBaseUploadFields = ({ config, collection }: Options): Field[] => {
|
||||
type: 'number',
|
||||
admin: {
|
||||
readOnly: true,
|
||||
disabled: true,
|
||||
hidden: true,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -61,7 +61,7 @@ const getBaseUploadFields = ({ config, collection }: Options): Field[] => {
|
||||
type: 'number',
|
||||
admin: {
|
||||
readOnly: true,
|
||||
disabled: true,
|
||||
hidden: true,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -73,7 +73,7 @@ const getBaseUploadFields = ({ config, collection }: Options): Field[] => {
|
||||
unique: true,
|
||||
admin: {
|
||||
readOnly: true,
|
||||
disabled: true,
|
||||
hidden: true,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -110,14 +110,14 @@ const getBaseUploadFields = ({ config, collection }: Options): Field[] => {
|
||||
label: labels['upload:Sizes'],
|
||||
type: 'group',
|
||||
admin: {
|
||||
disabled: true,
|
||||
hidden: true,
|
||||
},
|
||||
fields: uploadOptions.imageSizes.map((size) => ({
|
||||
label: size.name,
|
||||
name: size.name,
|
||||
type: 'group',
|
||||
admin: {
|
||||
disabled: true,
|
||||
hidden: true,
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user