Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions packages/payload/src/admin/forms/Form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ export type FormStateWithoutComponents = {
}

export type BuildFormStateArgs = {
/**
* If true, will check if the document has been modified since it was loaded.
* This helps detect stale data when multiple users are editing the same document.
*/
checkForStaleData?: boolean
data?: Data
docPermissions: SanitizedDocumentPermissions | undefined
docPreferences: DocumentPreferences
Expand All @@ -127,6 +132,11 @@ export type BuildFormStateArgs = {
*/
mockRSCs?: boolean
operation?: 'create' | 'update'
/**
* The original updatedAt timestamp from when the document was initially loaded.
* Used with checkForStaleData to detect if the document has been modified.
*/
originalUpdatedAt?: string
readOnly?: boolean
/**
* If true, will render field components within their state object.
Expand Down
3 changes: 3 additions & 0 deletions packages/translations/src/clientKeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ export const clientTranslationKeys = createClientTranslationKeys([
'general:document',
'general:documentIsTrashed',
'general:documentLocked',
'general:documentModified',
'general:documentOutOfDate',
'general:documents',
'general:duplicate',
'general:duplicateWithoutSaving',
Expand Down Expand Up @@ -315,6 +317,7 @@ export const clientTranslationKeys = createClientTranslationKeys([
'general:previous',
'general:reindex',
'general:reindexingAll',
'general:reloadDocument',
'general:remove',
'general:rename',
'general:reset',
Expand Down
3 changes: 3 additions & 0 deletions packages/translations/src/languages/ar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,8 @@ export const arTranslations: DefaultTranslationsObject = {
document: 'وثيقة',
documentIsTrashed: 'تم تحويل {{label}} هذا إلى المهملات وهو للقراءة فقط.',
documentLocked: 'تم قفل المستند',
documentModified: 'تم تعديل المستند',
documentOutOfDate: 'تم تحديث هذا المستند مؤخرًا بواسطة مستخدم آخر. عرضك غير محدث.',
documents: 'وثائق',
duplicate: 'استنساخ',
duplicateWithoutSaving: 'استنساخ بدون حفظ التغييرات',
Expand Down Expand Up @@ -380,6 +382,7 @@ export const arTranslations: DefaultTranslationsObject = {
previous: 'سابق',
reindex: 'إعادة الفهرسة',
reindexingAll: 'جاري إعادة فهرسة جميع {{collections}}.',
reloadDocument: 'أعد تحميل الوثيقة',
remove: 'إزالة',
rename: 'إعادة تسمية',
reset: 'إعادة تعيين',
Expand Down
4 changes: 4 additions & 0 deletions packages/translations/src/languages/az.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@ export const azTranslations: DefaultTranslationsObject = {
document: 'Sənəd',
documentIsTrashed: 'Bu {{label}} zibil qutusuna atılıb və yalnız oxuna bilər.',
documentLocked: 'Sənəd kilidləndi',
documentModified: 'Sənəd dəyişdirildi',
documentOutOfDate:
'Bu sənəd yeni başqa bir istifadəçi tərəfindən yenilənib. Sizin baxışınız köhnədir.',
documents: 'Sənədlər',
duplicate: 'Dublikat',
duplicateWithoutSaving: 'Dəyişiklikləri saxlamadan dublikatla',
Expand Down Expand Up @@ -394,6 +397,7 @@ export const azTranslations: DefaultTranslationsObject = {
previous: 'Əvvəlki',
reindex: 'Yenidən indekslə',
reindexingAll: 'Bütün {{collections}} yenidən indekslənir.',
reloadDocument: 'Sənədə yenidən yükləyin',
remove: 'Sil',
rename: 'Yenidən adlandırın',
reset: 'Yenidən başlat',
Expand Down
4 changes: 4 additions & 0 deletions packages/translations/src/languages/bg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,9 @@ export const bgTranslations: DefaultTranslationsObject = {
document: 'Документ',
documentIsTrashed: 'Този {{label}} е изтрит и е само за четене.',
documentLocked: 'Документът е заключен',
documentModified: 'Модифициран документ',
documentOutOfDate:
'Този документ беше наскоро обновен от друг потребител. Вашият изглед е неактуален.',
documents: 'Документи',
duplicate: 'Дупликирай',
duplicateWithoutSaving: 'Дупликирай без да запазваш промените',
Expand Down Expand Up @@ -391,6 +394,7 @@ export const bgTranslations: DefaultTranslationsObject = {
previous: 'Предишен',
reindex: 'Преиндексиране',
reindexingAll: 'Преиндексиране на всички {{collections}}.',
reloadDocument: 'Презареди документ',
remove: 'Премахни',
rename: 'Преименувайте',
reset: 'Нулиране',
Expand Down
4 changes: 4 additions & 0 deletions packages/translations/src/languages/bnBd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,9 @@ export const bnBdTranslations: DefaultTranslationsObject = {
document: 'ডকুমেন্ট',
documentIsTrashed: 'এই {{label}} ট্র্যাশ করা হয়েছে এবং এটি শুধুমাত্র পাঠনীয়।',
documentLocked: 'ডকুমেন্ট লক করা হয়েছে',
documentModified: 'নথি পরিবর্তিত হয়েছে',
documentOutOfDate:
'এই নথিটি সাম্প্রতিকভাবে অন্য ব্যবহারকারীর দ্বারা আপডেট করা হয়েছে। আপনার দর্শন আপতিত।',
documents: 'ডকুমেন্টগুলি',
duplicate: 'ডুপ্লিকেট করুন',
duplicateWithoutSaving: 'পরিবর্তনগুলি সংরক্ষণ না করে ডুপ্লিকেট করুন',
Expand Down Expand Up @@ -397,6 +400,7 @@ export const bnBdTranslations: DefaultTranslationsObject = {
previous: 'পূর্ববর্তী',
reindex: 'পুনরায় সূচিবদ্ধ করুন',
reindexingAll: 'সমস্ত {{collections}} পুনরায় সূচিবদ্ধ করা হচ্ছে।',
reloadDocument: 'নথি পুনরায় লোড করুন',
remove: 'অপসারণ করুন',
rename: 'নাম পরিবর্তন করুন',
reset: 'রিসেট করুন',
Expand Down
4 changes: 4 additions & 0 deletions packages/translations/src/languages/bnIn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,9 @@ export const bnInTranslations: DefaultTranslationsObject = {
document: 'ডকুমেন্ট',
documentIsTrashed: 'এই {{label}} টি মুছে ফেলা হয়েছে এবং এটি কেবল পড়ার জন্য।',
documentLocked: 'ডকুমেন্ট লক করা হয়েছে',
documentModified: 'নথি পরিবর্তিত হয়েছে',
documentOutOfDate:
'এই নথিটি সম্প্রতি অন্য ব্যবহারকারীর দ্বারা আপডেট করা হয়েছে। আপনার দেখানো ভার্সন আপ টু ডেট নয়।',
documents: 'ডকুমেন্টগুলি',
duplicate: 'ডুপ্লিকেট করুন',
duplicateWithoutSaving: 'পরিবর্তনগুলি সংরক্ষণ না করে ডুপ্লিকেট করুন',
Expand Down Expand Up @@ -396,6 +399,7 @@ export const bnInTranslations: DefaultTranslationsObject = {
previous: 'পূর্ববর্তী',
reindex: 'পুনরায় সূচিবদ্ধ করুন',
reindexingAll: 'সমস্ত {{collections}} পুনরায় সূচিবদ্ধ করা হচ্ছে।',
reloadDocument: 'নথি পুনরায় লোড করুন',
remove: 'অপসারণ করুন',
rename: 'নাম পরিবর্তন করুন',
reset: 'রিসেট করুন',
Expand Down
4 changes: 4 additions & 0 deletions packages/translations/src/languages/ca.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,9 @@ export const caTranslations: DefaultTranslationsObject = {
document: 'Document',
documentIsTrashed: "Aquesta {{label}} s'ha eliminat i és de només lectura.",
documentLocked: 'Document bloquejat',
documentModified: 'Document modificat',
documentOutOfDate:
'Aquest document ha estat actualitzat recentment per un altre usuari. La seva vista està desactualitzada.',
documents: 'Documents',
duplicate: 'Duplicar',
duplicateWithoutSaving: 'Duplica sense desar',
Expand Down Expand Up @@ -394,6 +397,7 @@ export const caTranslations: DefaultTranslationsObject = {
previous: 'Previ',
reindex: 'Reindexa',
reindexingAll: 'Reindexa tots el {{collections}}.',
reloadDocument: 'Recarrega el document',
remove: 'Elimina',
rename: 'Canvia el nom',
reset: 'Restableix',
Expand Down
4 changes: 4 additions & 0 deletions packages/translations/src/languages/cs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,9 @@ export const csTranslations: DefaultTranslationsObject = {
document: 'Dokument',
documentIsTrashed: 'Tento {{label}} je v koši a je pouze pro čtení.',
documentLocked: 'Dokument je uzamčen',
documentModified: 'Dokument upraven',
documentOutOfDate:
'Tento dokument byl nedávno aktualizován jiným uživatelem. Váš pohled je zastaralý.',
documents: 'Dokumenty',
duplicate: 'Duplikovat',
duplicateWithoutSaving: 'Duplikovat bez uložení změn',
Expand Down Expand Up @@ -390,6 +393,7 @@ export const csTranslations: DefaultTranslationsObject = {
previous: 'Předchozí',
reindex: 'Přeindexovat',
reindexingAll: 'Přeindexování všech {{collections}}.',
reloadDocument: 'Obnovit dokument',
remove: 'Odstranit',
rename: 'Přejmenovat',
reset: 'Resetovat',
Expand Down
4 changes: 4 additions & 0 deletions packages/translations/src/languages/da.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,9 @@ export const daTranslations: DefaultTranslationsObject = {
document: 'Dokument',
documentIsTrashed: 'Denne {{label}} er smidt væk og er kun til læsning.',
documentLocked: 'Dette dokument er låst',
documentModified: 'Dokument ændret',
documentOutOfDate:
'Dette dokument er for nylig blevet opdateret af en anden bruger. Din visning er forældet.',
documents: 'Dokumenter',
duplicate: 'Duplikér',
duplicateWithoutSaving: 'Dupliker uden at gemme ændringer',
Expand Down Expand Up @@ -390,6 +393,7 @@ export const daTranslations: DefaultTranslationsObject = {
previous: 'Tidligere',
reindex: 'Genindekser',
reindexingAll: 'Genindekserer alle {{collections}}.',
reloadDocument: 'Genindlæs dokument',
remove: 'Fjern',
rename: 'Omdøb',
reset: 'Nulstil',
Expand Down
4 changes: 4 additions & 0 deletions packages/translations/src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,9 @@ export const deTranslations: DefaultTranslationsObject = {
document: 'Dokument',
documentIsTrashed: 'Dieses {{label}} wurde gelöscht und ist nur lesbar.',
documentLocked: 'Dokument gesperrt',
documentModified: 'Dokument geändert',
documentOutOfDate:
'Dieses Dokument wurde kürzlich von einem anderen Benutzer aktualisiert. Ihre Ansicht ist veraltet.',
documents: 'Dokumente',
duplicate: 'Duplizieren',
duplicateWithoutSaving: 'Duplizieren ohne Änderungen zu speichern',
Expand Down Expand Up @@ -401,6 +404,7 @@ export const deTranslations: DefaultTranslationsObject = {
previous: 'Vorherige',
reindex: 'Neuindizieren',
reindexingAll: 'Alle {{collections}} werden neu indiziert.',
reloadDocument: 'Dokument neu laden',
remove: 'Entfernen',
rename: 'Umbenennen',
reset: 'Zurücksetzen',
Expand Down
4 changes: 4 additions & 0 deletions packages/translations/src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,9 @@ export const enTranslations = {
document: 'Document',
documentIsTrashed: 'This {{label}} is trashed and is read-only.',
documentLocked: 'Document locked',
documentModified: 'Document modified',
documentOutOfDate:
'This document was recently updated by another user. Your view is out of date.',
documents: 'Documents',
duplicate: 'Duplicate',
duplicateWithoutSaving: 'Duplicate without saving changes',
Expand Down Expand Up @@ -392,6 +395,7 @@ export const enTranslations = {
previous: 'Previous',
reindex: 'Reindex',
reindexingAll: 'Reindexing all {{collections}}.',
reloadDocument: 'Reload document',
remove: 'Remove',
rename: 'Rename',
reset: 'Reset',
Expand Down
4 changes: 4 additions & 0 deletions packages/translations/src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,9 @@ export const esTranslations: DefaultTranslationsObject = {
document: 'Documento',
documentIsTrashed: 'Esta {{label}} está en la papelera y es de solo lectura.',
documentLocked: 'Documento bloqueado',
documentModified: 'Documento modificado',
documentOutOfDate:
'Este documento ha sido actualizado recientemente por otro usuario. Su vista está desactualizada.',
documents: 'Documentos',
duplicate: 'Duplicar',
duplicateWithoutSaving: 'Duplicar sin guardar cambios',
Expand Down Expand Up @@ -398,6 +401,7 @@ export const esTranslations: DefaultTranslationsObject = {
previous: 'Anterior',
reindex: 'Reindexar',
reindexingAll: 'Reindexando todas las {{collections}}.',
reloadDocument: 'Recargar documento',
remove: 'Eliminar',
rename: 'Renombrar',
reset: 'Restablecer',
Expand Down
4 changes: 4 additions & 0 deletions packages/translations/src/languages/et.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,9 @@ export const etTranslations: DefaultTranslationsObject = {
document: 'Dokument',
documentIsTrashed: 'See {{label}} on prügikastis ja on ainult loetav.',
documentLocked: 'Dokument lukustatud',
documentModified: 'Dokumenti muudetud',
documentOutOfDate:
'Seda dokumenti on hiljuti värskendanud teine kasutaja. Teie vaade on aegunud.',
documents: 'Dokumendid',
duplicate: 'Dubleeri',
duplicateWithoutSaving: 'Dubleeri ilma muudatusi salvestamata',
Expand Down Expand Up @@ -388,6 +391,7 @@ export const etTranslations: DefaultTranslationsObject = {
previous: 'Eelmine',
reindex: 'Indekseeri uuesti',
reindexingAll: 'Indekseerin uuesti kõik {{collections}}.',
reloadDocument: 'Laadige dokument uuesti',
remove: 'Eemalda',
rename: 'Nimeta ümber',
reset: 'Lähtesta',
Expand Down
3 changes: 3 additions & 0 deletions packages/translations/src/languages/fa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@ export const faTranslations: DefaultTranslationsObject = {
document: 'صفحه',
documentIsTrashed: 'این {{label}} به سطل زباله منتقل شده و فقط قابل خواندن است.',
documentLocked: 'این صفحه قفل است',
documentModified: 'سند تغییر یافته',
documentOutOfDate: 'این سند اخیراً توسط کاربر دیگری به روز شده است. نمایش شما به روز نیست.',
documents: 'اسناد',
duplicate: 'ایجاد کپی',
duplicateWithoutSaving: 'ایجاد کپی بدون ذخیره تغییرات',
Expand Down Expand Up @@ -384,6 +386,7 @@ export const faTranslations: DefaultTranslationsObject = {
previous: 'قبلی',
reindex: 'ایندکس مجدد',
reindexingAll: 'در حال ایندکس مجدد همه {{collections}}...',
reloadDocument: 'بارگذاری مجدد سند',
remove: 'حذف',
rename: 'تغییر نام',
reset: 'بازنشانی',
Expand Down
4 changes: 4 additions & 0 deletions packages/translations/src/languages/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,9 @@ export const frTranslations: DefaultTranslationsObject = {
document: 'Document',
documentIsTrashed: 'Ce {{label}} est mis à la corbeille et est en lecture seule.',
documentLocked: 'Document verrouillé',
documentModified: 'Document modifié',
documentOutOfDate:
'Ce document a récemment été mis à jour par un autre utilisateur. Votre vue est obsolète.',
documents: 'Documents',
duplicate: 'Dupliquer',
duplicateWithoutSaving: 'Dupliquer sans enregistrer les modifications',
Expand Down Expand Up @@ -402,6 +405,7 @@ export const frTranslations: DefaultTranslationsObject = {
previous: 'Précédent',
reindex: 'Réindexer',
reindexingAll: 'Réindexation de toutes les {{collections}}.',
reloadDocument: 'Recharger le document',
remove: 'Retirer',
rename: 'Renommer',
reset: 'Réinitialiser',
Expand Down
3 changes: 3 additions & 0 deletions packages/translations/src/languages/he.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,8 @@ export const heTranslations: DefaultTranslationsObject = {
document: 'מסמך',
documentIsTrashed: 'ה{{label}} הזה במיחזור ובמצב לקריאה בלבד.',
documentLocked: 'המסמך ננעל',
documentModified: 'מסמך שונה',
documentOutOfDate: 'מסמך זה עודכן לאחרונה על ידי משתמש אחר. התצוגה שלך אינה מעודכנת.',
documents: 'מסמכים',
duplicate: 'שכפול',
duplicateWithoutSaving: 'שכפול ללא שמירת שינויים',
Expand Down Expand Up @@ -379,6 +381,7 @@ export const heTranslations: DefaultTranslationsObject = {
previous: 'קודם',
reindex: 'החזרת אינדקס',
reindexingAll: 'החזרת אינדקס לכל {{collections}}.',
reloadDocument: 'טען מחדש את המסמך',
remove: 'הסר',
rename: 'שנה שם',
reset: 'איפוס',
Expand Down
3 changes: 3 additions & 0 deletions packages/translations/src/languages/hr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,8 @@ export const hrTranslations: DefaultTranslationsObject = {
document: 'Dokument',
documentIsTrashed: 'Ova {{label}} je u smeću i dostupna je samo za čitanje.',
documentLocked: 'Dokument je zaključan',
documentModified: 'Dokument izmijenjen',
documentOutOfDate: 'Ovaj dokument je nedavno ažurirao drugi korisnik. Vaš pogled je zastario.',
documents: 'Dokumenti',
duplicate: 'Duplikat',
duplicateWithoutSaving: 'Dupliciraj bez spremanja promjena',
Expand Down Expand Up @@ -392,6 +394,7 @@ export const hrTranslations: DefaultTranslationsObject = {
previous: 'Prethodni',
reindex: 'Ponovno indeksiraj',
reindexingAll: 'Ponovno indeksiranje svih {{collections}}.',
reloadDocument: 'Ponovno učitaj dokument',
remove: 'Ukloni',
rename: 'Preimenuj',
reset: 'Ponovno postavi',
Expand Down
4 changes: 4 additions & 0 deletions packages/translations/src/languages/hu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,9 @@ export const huTranslations: DefaultTranslationsObject = {
document: 'Dokumentum',
documentIsTrashed: 'Ez a {{label}} szemétdobozba került, és csak olvasható.',
documentLocked: 'A dokumentum zárolva van',
documentModified: 'Módosított dokumentum',
documentOutOfDate:
'Ezt a dokumentumot nemrégiben frissítette egy másik felhasználó. A megtekintése elavult.',
documents: 'Dokumentumok',
duplicate: 'Duplikálás',
duplicateWithoutSaving: 'Duplikálás a módosítások mentése nélkül',
Expand Down Expand Up @@ -395,6 +398,7 @@ export const huTranslations: DefaultTranslationsObject = {
previous: 'Előző',
reindex: 'Újraindexelés',
reindexingAll: 'Az összes {{collections}} újraindexálása folyamatban.',
reloadDocument: 'Dokumentum újratöltése',
remove: 'Törlés',
rename: 'Átnevez',
reset: 'Visszaállítás',
Expand Down
4 changes: 4 additions & 0 deletions packages/translations/src/languages/hy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,9 @@ export const hyTranslations: DefaultTranslationsObject = {
document: 'Փաստաթուղթ',
documentIsTrashed: 'Այս {{label}}-ն աղբարկղած է և հասանելի է միայն ընթերցման համար։',
documentLocked: 'Փաստաթուղթը կողպված է',
documentModified: 'Փաստաթուղթը փոփոխված է',
documentOutOfDate:
'Այս փաստաթուղթը վերջերս թարմացրել է մեկ այլ օգտագործող։ Ձեր տեսքը անթարմացած է։',
documents: 'Փաստաթղթեր',
duplicate: 'Կրկնօրինակել',
duplicateWithoutSaving: 'Կրկնօրինակել առանց փոփոխությունները պահպանելու',
Expand Down Expand Up @@ -393,6 +396,7 @@ export const hyTranslations: DefaultTranslationsObject = {
previous: 'Նախորդ',
reindex: 'Վերաինդեքսավորել',
reindexingAll: 'Վերաինդեքսավորվում են բոլոր {{collections}}-ները։',
reloadDocument: 'Թարմացնել փաստաթուղթը',
remove: 'Հեռացնել',
rename: 'Վերանվանել',
reset: 'Վերակայել',
Expand Down
4 changes: 4 additions & 0 deletions packages/translations/src/languages/id.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,9 @@ export const idTranslations: DefaultTranslationsObject = {
document: 'Dokumen',
documentIsTrashed: '{{label}} ini ada di tempat sampah dan bersifat hanya-baca.',
documentLocked: 'Dokumen terkunci',
documentModified: 'Dokumen dimodifikasi',
documentOutOfDate:
'Dokumen ini baru-baru ini diperbarui oleh pengguna lain. Tampilan Anda sudah usang.',
documents: 'Dokumen',
duplicate: 'Duplikat',
duplicateWithoutSaving: 'Duplikat tanpa menyimpan perubahan',
Expand Down Expand Up @@ -393,6 +396,7 @@ export const idTranslations: DefaultTranslationsObject = {
previous: 'Sebelumnya',
reindex: 'Indeks Ulang',
reindexingAll: 'Mengindeks ulang semua {{collections}}.',
reloadDocument: 'Muat ulang dokumen',
remove: 'Hapus',
rename: 'Ganti Nama',
reset: 'Atur Ulang',
Expand Down
Loading