fix(ui): email field now correctly renders autocomplete attribute (#7322)
Adds test as well for the email field
This commit is contained in:
@@ -39,6 +39,7 @@ export interface Config {
|
||||
'collapsible-fields': CollapsibleField;
|
||||
'conditional-logic': ConditionalLogic;
|
||||
'date-fields': DateField;
|
||||
'email-fields': EmailField;
|
||||
'radio-fields': RadioField;
|
||||
'group-fields': GroupField;
|
||||
'row-fields': RowField;
|
||||
@@ -60,7 +61,7 @@ export interface Config {
|
||||
'payload-migrations': PayloadMigration;
|
||||
};
|
||||
db: {
|
||||
defaultIDType: string;
|
||||
defaultIDType: number;
|
||||
};
|
||||
globals: {
|
||||
tabsWithRichText: TabsWithRichText;
|
||||
@@ -91,7 +92,7 @@ export interface UserAuthOperations {
|
||||
* via the `definition` "lexical-fields".
|
||||
*/
|
||||
export interface LexicalField {
|
||||
id: string;
|
||||
id: number;
|
||||
title: string;
|
||||
lexicalSimple?: {
|
||||
root: {
|
||||
@@ -132,7 +133,7 @@ export interface LexicalField {
|
||||
* via the `definition` "lexical-migrate-fields".
|
||||
*/
|
||||
export interface LexicalMigrateField {
|
||||
id: string;
|
||||
id: number;
|
||||
title: string;
|
||||
lexicalWithLexicalPluginData?: {
|
||||
root: {
|
||||
@@ -227,7 +228,7 @@ export interface LexicalMigrateField {
|
||||
* via the `definition` "lexical-localized-fields".
|
||||
*/
|
||||
export interface LexicalLocalizedField {
|
||||
id: string;
|
||||
id: number;
|
||||
title: string;
|
||||
lexicalBlocksSubLocalized?: {
|
||||
root: {
|
||||
@@ -267,7 +268,7 @@ export interface LexicalLocalizedField {
|
||||
* via the `definition` "users".
|
||||
*/
|
||||
export interface User {
|
||||
id: string;
|
||||
id: number;
|
||||
canViewConditionalField?: boolean | null;
|
||||
updatedAt: string;
|
||||
createdAt: string;
|
||||
@@ -285,7 +286,7 @@ export interface User {
|
||||
* via the `definition` "array-fields".
|
||||
*/
|
||||
export interface ArrayField {
|
||||
id: string;
|
||||
id: number;
|
||||
title?: string | null;
|
||||
items: {
|
||||
text: string;
|
||||
@@ -349,7 +350,7 @@ export interface ArrayField {
|
||||
* via the `definition` "block-fields".
|
||||
*/
|
||||
export interface BlockField {
|
||||
id: string;
|
||||
id: number;
|
||||
blocks: (
|
||||
| {
|
||||
text: string;
|
||||
@@ -676,7 +677,7 @@ export interface BlockField {
|
||||
| null;
|
||||
relationshipBlocks?:
|
||||
| {
|
||||
relationship?: (string | null) | TextField;
|
||||
relationship?: (number | null) | TextField;
|
||||
id?: string | null;
|
||||
blockName?: string | null;
|
||||
blockType: 'relationships';
|
||||
@@ -690,7 +691,7 @@ export interface BlockField {
|
||||
* via the `definition` "text-fields".
|
||||
*/
|
||||
export interface TextField {
|
||||
id: string;
|
||||
id: number;
|
||||
text: string;
|
||||
localizedText?: string | null;
|
||||
i18nText?: string | null;
|
||||
@@ -719,7 +720,7 @@ export interface TextField {
|
||||
* via the `definition` "checkbox-fields".
|
||||
*/
|
||||
export interface CheckboxField {
|
||||
id: string;
|
||||
id: number;
|
||||
checkbox: boolean;
|
||||
updatedAt: string;
|
||||
createdAt: string;
|
||||
@@ -729,7 +730,7 @@ export interface CheckboxField {
|
||||
* via the `definition` "code-fields".
|
||||
*/
|
||||
export interface CodeField {
|
||||
id: string;
|
||||
id: number;
|
||||
javascript?: string | null;
|
||||
typescript?: string | null;
|
||||
json?: string | null;
|
||||
@@ -743,7 +744,7 @@ export interface CodeField {
|
||||
* via the `definition` "collapsible-fields".
|
||||
*/
|
||||
export interface CollapsibleField {
|
||||
id: string;
|
||||
id: number;
|
||||
text: string;
|
||||
group?: {
|
||||
textWithinGroup?: string | null;
|
||||
@@ -775,7 +776,7 @@ export interface CollapsibleField {
|
||||
* via the `definition` "conditional-logic".
|
||||
*/
|
||||
export interface ConditionalLogic {
|
||||
id: string;
|
||||
id: number;
|
||||
text: string;
|
||||
toggleField?: boolean | null;
|
||||
fieldToToggle?: string | null;
|
||||
@@ -800,7 +801,7 @@ export interface ConditionalLogic {
|
||||
* via the `definition` "date-fields".
|
||||
*/
|
||||
export interface DateField {
|
||||
id: string;
|
||||
id: number;
|
||||
default: string;
|
||||
timeOnly?: string | null;
|
||||
timeOnlyWithCustomFormat?: string | null;
|
||||
@@ -810,12 +811,33 @@ export interface DateField {
|
||||
updatedAt: string;
|
||||
createdAt: string;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "email-fields".
|
||||
*/
|
||||
export interface EmailField {
|
||||
id: number;
|
||||
email: string;
|
||||
localizedEmail?: string | null;
|
||||
i18nEmail?: string | null;
|
||||
defaultEmail?: string | null;
|
||||
defaultEmptyString?: string | null;
|
||||
defaultFunction?: string | null;
|
||||
defaultAsync?: string | null;
|
||||
customLabel?: string | null;
|
||||
customError?: string | null;
|
||||
beforeAndAfterInput?: string | null;
|
||||
disableListColumnText?: string | null;
|
||||
disableListFilterText?: string | null;
|
||||
updatedAt: string;
|
||||
createdAt: string;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "radio-fields".
|
||||
*/
|
||||
export interface RadioField {
|
||||
id: string;
|
||||
id: number;
|
||||
radio?: ('one' | 'two' | 'three') | null;
|
||||
updatedAt: string;
|
||||
createdAt: string;
|
||||
@@ -825,7 +847,7 @@ export interface RadioField {
|
||||
* via the `definition` "group-fields".
|
||||
*/
|
||||
export interface GroupField {
|
||||
id: string;
|
||||
id: number;
|
||||
group: {
|
||||
text: string;
|
||||
defaultParent?: string | null;
|
||||
@@ -900,7 +922,7 @@ export interface RowField {
|
||||
* via the `definition` "indexed-fields".
|
||||
*/
|
||||
export interface IndexedField {
|
||||
id: string;
|
||||
id: number;
|
||||
text: string;
|
||||
uniqueText?: string | null;
|
||||
uniqueRequiredText: string;
|
||||
@@ -929,7 +951,7 @@ export interface IndexedField {
|
||||
* via the `definition` "json-fields".
|
||||
*/
|
||||
export interface JsonField {
|
||||
id: string;
|
||||
id: number;
|
||||
json?: {
|
||||
foo?: 'bar' | 'foobar';
|
||||
number?: 10 | 5;
|
||||
@@ -954,7 +976,7 @@ export interface JsonField {
|
||||
* via the `definition` "number-fields".
|
||||
*/
|
||||
export interface NumberField {
|
||||
id: string;
|
||||
id: number;
|
||||
number?: number | null;
|
||||
min?: number | null;
|
||||
max?: number | null;
|
||||
@@ -975,7 +997,7 @@ export interface NumberField {
|
||||
* via the `definition` "point-fields".
|
||||
*/
|
||||
export interface PointField {
|
||||
id: string;
|
||||
id: number;
|
||||
/**
|
||||
* @minItems 2
|
||||
* @maxItems 2
|
||||
@@ -1001,49 +1023,49 @@ export interface PointField {
|
||||
* via the `definition` "relationship-fields".
|
||||
*/
|
||||
export interface RelationshipField {
|
||||
id: string;
|
||||
id: number;
|
||||
text?: string | null;
|
||||
relationship:
|
||||
| {
|
||||
relationTo: 'text-fields';
|
||||
value: string | TextField;
|
||||
value: number | TextField;
|
||||
}
|
||||
| {
|
||||
relationTo: 'array-fields';
|
||||
value: string | ArrayField;
|
||||
value: number | ArrayField;
|
||||
};
|
||||
relationHasManyPolymorphic?:
|
||||
| (
|
||||
| {
|
||||
relationTo: 'text-fields';
|
||||
value: string | TextField;
|
||||
value: number | TextField;
|
||||
}
|
||||
| {
|
||||
relationTo: 'array-fields';
|
||||
value: string | ArrayField;
|
||||
value: number | ArrayField;
|
||||
}
|
||||
)[]
|
||||
| null;
|
||||
relationToSelf?: (string | null) | RelationshipField;
|
||||
relationToSelfSelectOnly?: (string | null) | RelationshipField;
|
||||
relationWithDynamicDefault?: (string | null) | User;
|
||||
relationToSelf?: (number | null) | RelationshipField;
|
||||
relationToSelfSelectOnly?: (number | null) | RelationshipField;
|
||||
relationWithDynamicDefault?: (number | null) | User;
|
||||
relationHasManyWithDynamicDefault?: {
|
||||
relationTo: 'users';
|
||||
value: string | User;
|
||||
value: number | User;
|
||||
} | null;
|
||||
relationshipWithMin?: (string | TextField)[] | null;
|
||||
relationshipWithMax?: (string | TextField)[] | null;
|
||||
relationshipHasMany?: (string | TextField)[] | null;
|
||||
relationshipWithMin?: (number | TextField)[] | null;
|
||||
relationshipWithMax?: (number | TextField)[] | null;
|
||||
relationshipHasMany?: (number | TextField)[] | null;
|
||||
array?:
|
||||
| {
|
||||
relationship?: (string | null) | TextField;
|
||||
relationship?: (number | null) | TextField;
|
||||
id?: string | null;
|
||||
}[]
|
||||
| null;
|
||||
relationshipWithMinRows?:
|
||||
| {
|
||||
relationTo: 'text-fields';
|
||||
value: string | TextField;
|
||||
value: number | TextField;
|
||||
}[]
|
||||
| null;
|
||||
updatedAt: string;
|
||||
@@ -1054,7 +1076,7 @@ export interface RelationshipField {
|
||||
* via the `definition` "rich-text-fields".
|
||||
*/
|
||||
export interface RichTextField {
|
||||
id: string;
|
||||
id: number;
|
||||
title: string;
|
||||
lexicalCustomFields: {
|
||||
root: {
|
||||
@@ -1129,7 +1151,7 @@ export interface RichTextField {
|
||||
* via the `definition` "select-fields".
|
||||
*/
|
||||
export interface SelectField {
|
||||
id: string;
|
||||
id: number;
|
||||
select?: ('one' | 'two' | 'three') | null;
|
||||
selectReadOnly?: ('one' | 'two' | 'three') | null;
|
||||
selectHasMany?: ('one' | 'two' | 'three' | 'four' | 'five' | 'six')[] | null;
|
||||
@@ -1147,7 +1169,7 @@ export interface SelectField {
|
||||
* via the `definition` "tabs-fields-2".
|
||||
*/
|
||||
export interface TabsFields2 {
|
||||
id: string;
|
||||
id: number;
|
||||
tabsInArray?:
|
||||
| {
|
||||
text?: string | null;
|
||||
@@ -1165,7 +1187,7 @@ export interface TabsFields2 {
|
||||
* via the `definition` "tabs-fields".
|
||||
*/
|
||||
export interface TabsField {
|
||||
id: string;
|
||||
id: number;
|
||||
sidebarField?: string | null;
|
||||
array: {
|
||||
text: string;
|
||||
@@ -1274,9 +1296,9 @@ export interface TabsField {
|
||||
* via the `definition` "uploads".
|
||||
*/
|
||||
export interface Upload {
|
||||
id: string;
|
||||
id: number;
|
||||
text?: string | null;
|
||||
media?: string | Upload | null;
|
||||
media?: number | Upload | null;
|
||||
richText?: {
|
||||
root: {
|
||||
type: string;
|
||||
@@ -1309,9 +1331,9 @@ export interface Upload {
|
||||
* via the `definition` "uploads2".
|
||||
*/
|
||||
export interface Uploads2 {
|
||||
id: string;
|
||||
id: number;
|
||||
text?: string | null;
|
||||
media?: string | Uploads2 | null;
|
||||
media?: number | Uploads2 | null;
|
||||
updatedAt: string;
|
||||
createdAt: string;
|
||||
url?: string | null;
|
||||
@@ -1329,8 +1351,8 @@ export interface Uploads2 {
|
||||
* via the `definition` "uploads3".
|
||||
*/
|
||||
export interface Uploads3 {
|
||||
id: string;
|
||||
media?: string | Uploads3 | null;
|
||||
id: number;
|
||||
media?: number | Uploads3 | null;
|
||||
richText?: {
|
||||
root: {
|
||||
type: string;
|
||||
@@ -1363,7 +1385,7 @@ export interface Uploads3 {
|
||||
* via the `definition` "ui-fields".
|
||||
*/
|
||||
export interface UiField {
|
||||
id: string;
|
||||
id: number;
|
||||
text: string;
|
||||
updatedAt: string;
|
||||
createdAt: string;
|
||||
@@ -1373,10 +1395,10 @@ export interface UiField {
|
||||
* via the `definition` "payload-preferences".
|
||||
*/
|
||||
export interface PayloadPreference {
|
||||
id: string;
|
||||
id: number;
|
||||
user: {
|
||||
relationTo: 'users';
|
||||
value: string | User;
|
||||
value: number | User;
|
||||
};
|
||||
key?: string | null;
|
||||
value?:
|
||||
@@ -1396,7 +1418,7 @@ export interface PayloadPreference {
|
||||
* via the `definition` "payload-migrations".
|
||||
*/
|
||||
export interface PayloadMigration {
|
||||
id: string;
|
||||
id: number;
|
||||
name?: string | null;
|
||||
batch?: number | null;
|
||||
updatedAt: string;
|
||||
@@ -1407,7 +1429,7 @@ export interface PayloadMigration {
|
||||
* via the `definition` "tabsWithRichText".
|
||||
*/
|
||||
export interface TabsWithRichText {
|
||||
id: string;
|
||||
id: number;
|
||||
tab1?: {
|
||||
rt1?: {
|
||||
root: {
|
||||
|
||||
Reference in New Issue
Block a user