Removed tags
This commit is contained in:
parent
2c4842244d
commit
ab2032ff0c
|
@ -3,7 +3,6 @@ import { attributesField } from "../../fields/attributesField/attributesField";
|
||||||
import { creditsField } from "../../fields/creditsField/creditsField";
|
import { creditsField } from "../../fields/creditsField/creditsField";
|
||||||
import { imageField } from "../../fields/imageField/imageField";
|
import { imageField } from "../../fields/imageField/imageField";
|
||||||
import { rowField } from "../../fields/rowField/rowField";
|
import { rowField } from "../../fields/rowField/rowField";
|
||||||
import { tagsField } from "../../fields/tagsField/tagsField";
|
|
||||||
import { translatedFields } from "../../fields/translatedFields/translatedFields";
|
import { translatedFields } from "../../fields/translatedFields/translatedFields";
|
||||||
import { buildCollectionConfig } from "../../utils/collectionConfig";
|
import { buildCollectionConfig } from "../../utils/collectionConfig";
|
||||||
import { createEditor } from "../../utils/editor";
|
import { createEditor } from "../../utils/editor";
|
||||||
|
@ -21,7 +20,6 @@ const fields = {
|
||||||
translationsDescription: "description",
|
translationsDescription: "description",
|
||||||
thumbnail: "thumbnail",
|
thumbnail: "thumbnail",
|
||||||
duration: "duration",
|
duration: "duration",
|
||||||
tags: "tags",
|
|
||||||
attributes: "attributes",
|
attributes: "attributes",
|
||||||
credits: "credits",
|
credits: "credits",
|
||||||
};
|
};
|
||||||
|
@ -73,7 +71,6 @@ export const Audios = buildCollectionConfig({
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
tagsField({ name: fields.tags }),
|
|
||||||
attributesField({ name: fields.attributes }),
|
attributesField({ name: fields.attributes }),
|
||||||
creditsField({ name: fields.credits }),
|
creditsField({ name: fields.credits }),
|
||||||
],
|
],
|
||||||
|
|
|
@ -14,7 +14,6 @@ import { creditsField } from "../../fields/creditsField/creditsField";
|
||||||
import { imageField } from "../../fields/imageField/imageField";
|
import { imageField } from "../../fields/imageField/imageField";
|
||||||
import { rowField } from "../../fields/rowField/rowField";
|
import { rowField } from "../../fields/rowField/rowField";
|
||||||
import { slugField } from "../../fields/slugField/slugField";
|
import { slugField } from "../../fields/slugField/slugField";
|
||||||
import { tagsField } from "../../fields/tagsField/tagsField";
|
|
||||||
import { translatedFields } from "../../fields/translatedFields/translatedFields";
|
import { translatedFields } from "../../fields/translatedFields/translatedFields";
|
||||||
import { beforeDuplicateAddCopyTo } from "../../hooks/beforeDuplicateAddCopyTo";
|
import { beforeDuplicateAddCopyTo } from "../../hooks/beforeDuplicateAddCopyTo";
|
||||||
import { beforeDuplicatePiping } from "../../hooks/beforeDuplicatePiping";
|
import { beforeDuplicatePiping } from "../../hooks/beforeDuplicatePiping";
|
||||||
|
@ -34,7 +33,6 @@ const fields = {
|
||||||
thumbnail: "thumbnail",
|
thumbnail: "thumbnail",
|
||||||
backgroundImage: "backgroundImage",
|
backgroundImage: "backgroundImage",
|
||||||
nature: "nature",
|
nature: "nature",
|
||||||
tags: "tags",
|
|
||||||
attributes: "attributes",
|
attributes: "attributes",
|
||||||
languages: "languages",
|
languages: "languages",
|
||||||
|
|
||||||
|
@ -190,7 +188,6 @@ export const Collectibles = buildVersionedCollectionConfig({
|
||||||
},
|
},
|
||||||
]),
|
]),
|
||||||
|
|
||||||
tagsField({ name: fields.tags }),
|
|
||||||
attributesField({ name: fields.attributes }),
|
attributesField({ name: fields.attributes }),
|
||||||
|
|
||||||
translatedFields({
|
translatedFields({
|
||||||
|
|
|
@ -2,7 +2,6 @@ import { Collections } from "../../constants";
|
||||||
import { attributesField } from "../../fields/attributesField/attributesField";
|
import { attributesField } from "../../fields/attributesField/attributesField";
|
||||||
import { creditsField } from "../../fields/creditsField/creditsField";
|
import { creditsField } from "../../fields/creditsField/creditsField";
|
||||||
import { rowField } from "../../fields/rowField/rowField";
|
import { rowField } from "../../fields/rowField/rowField";
|
||||||
import { tagsField } from "../../fields/tagsField/tagsField";
|
|
||||||
import { translatedFields } from "../../fields/translatedFields/translatedFields";
|
import { translatedFields } from "../../fields/translatedFields/translatedFields";
|
||||||
import { createEditor } from "../../utils/editor";
|
import { createEditor } from "../../utils/editor";
|
||||||
import { buildImageCollectionConfig } from "../../utils/imageCollectionConfig";
|
import { buildImageCollectionConfig } from "../../utils/imageCollectionConfig";
|
||||||
|
@ -19,7 +18,6 @@ const fields = {
|
||||||
translationsTitle: "title",
|
translationsTitle: "title",
|
||||||
translationsSubtitle: "subtitle",
|
translationsSubtitle: "subtitle",
|
||||||
translationsDescription: "description",
|
translationsDescription: "description",
|
||||||
tags: "tags",
|
|
||||||
attributes: "attributes",
|
attributes: "attributes",
|
||||||
credits: "credits",
|
credits: "credits",
|
||||||
} as const satisfies Record<string, string>;
|
} as const satisfies Record<string, string>;
|
||||||
|
@ -65,7 +63,6 @@ export const Images = buildImageCollectionConfig({
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
tagsField({ name: fields.tags }),
|
|
||||||
attributesField({ name: fields.attributes }),
|
attributesField({ name: fields.attributes }),
|
||||||
creditsField({ name: fields.credits }),
|
creditsField({ name: fields.credits }),
|
||||||
],
|
],
|
||||||
|
|
|
@ -10,7 +10,6 @@ import { creditsField } from "../../fields/creditsField/creditsField";
|
||||||
import { imageField } from "../../fields/imageField/imageField";
|
import { imageField } from "../../fields/imageField/imageField";
|
||||||
import { rowField } from "../../fields/rowField/rowField";
|
import { rowField } from "../../fields/rowField/rowField";
|
||||||
import { slugField } from "../../fields/slugField/slugField";
|
import { slugField } from "../../fields/slugField/slugField";
|
||||||
import { tagsField } from "../../fields/tagsField/tagsField";
|
|
||||||
import { translatedFields } from "../../fields/translatedFields/translatedFields";
|
import { translatedFields } from "../../fields/translatedFields/translatedFields";
|
||||||
import { beforeDuplicateAddCopyTo } from "../../hooks/beforeDuplicateAddCopyTo";
|
import { beforeDuplicateAddCopyTo } from "../../hooks/beforeDuplicateAddCopyTo";
|
||||||
import { beforeDuplicatePiping } from "../../hooks/beforeDuplicatePiping";
|
import { beforeDuplicatePiping } from "../../hooks/beforeDuplicatePiping";
|
||||||
|
@ -24,7 +23,6 @@ const fields = {
|
||||||
thumbnail: "thumbnail",
|
thumbnail: "thumbnail",
|
||||||
backgroundImage: "backgroundImage",
|
backgroundImage: "backgroundImage",
|
||||||
translations: "translations",
|
translations: "translations",
|
||||||
tags: "tags",
|
|
||||||
attributes: "attributes",
|
attributes: "attributes",
|
||||||
sourceLanguage: "sourceLanguage",
|
sourceLanguage: "sourceLanguage",
|
||||||
pretitle: "pretitle",
|
pretitle: "pretitle",
|
||||||
|
@ -50,7 +48,6 @@ export const Pages = buildVersionedCollectionConfig({
|
||||||
fields.slug,
|
fields.slug,
|
||||||
fields.thumbnail,
|
fields.thumbnail,
|
||||||
fields.backgroundImage,
|
fields.backgroundImage,
|
||||||
fields.tags,
|
|
||||||
fields.translations,
|
fields.translations,
|
||||||
fields.folders,
|
fields.folders,
|
||||||
],
|
],
|
||||||
|
@ -90,7 +87,6 @@ export const Pages = buildVersionedCollectionConfig({
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
]),
|
]),
|
||||||
tagsField({ name: fields.tags }),
|
|
||||||
attributesField({ name: fields.attributes }),
|
attributesField({ name: fields.attributes }),
|
||||||
translatedFields({
|
translatedFields({
|
||||||
name: fields.translations,
|
name: fields.translations,
|
||||||
|
|
|
@ -4,7 +4,6 @@ import { componentField } from "../../fields/componentField/componentField";
|
||||||
import { creditsField } from "../../fields/creditsField/creditsField";
|
import { creditsField } from "../../fields/creditsField/creditsField";
|
||||||
import { imageField } from "../../fields/imageField/imageField";
|
import { imageField } from "../../fields/imageField/imageField";
|
||||||
import { rowField } from "../../fields/rowField/rowField";
|
import { rowField } from "../../fields/rowField/rowField";
|
||||||
import { tagsField } from "../../fields/tagsField/tagsField";
|
|
||||||
import { translatedFields } from "../../fields/translatedFields/translatedFields";
|
import { translatedFields } from "../../fields/translatedFields/translatedFields";
|
||||||
import { buildCollectionConfig } from "../../utils/collectionConfig";
|
import { buildCollectionConfig } from "../../utils/collectionConfig";
|
||||||
import { createEditor } from "../../utils/editor";
|
import { createEditor } from "../../utils/editor";
|
||||||
|
@ -23,7 +22,6 @@ const fields = {
|
||||||
translationsSubfile: "subfile",
|
translationsSubfile: "subfile",
|
||||||
thumbnail: "thumbnail",
|
thumbnail: "thumbnail",
|
||||||
duration: "duration",
|
duration: "duration",
|
||||||
tags: "tags",
|
|
||||||
attributes: "attributes",
|
attributes: "attributes",
|
||||||
platform: "platform",
|
platform: "platform",
|
||||||
platformChannel: "channel",
|
platformChannel: "channel",
|
||||||
|
@ -88,7 +86,6 @@ export const Videos = buildCollectionConfig({
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
tagsField({ name: fields.tags }),
|
|
||||||
attributesField({ name: fields.attributes }),
|
attributesField({ name: fields.attributes }),
|
||||||
creditsField({ name: fields.credits }),
|
creditsField({ name: fields.credits }),
|
||||||
componentField({
|
componentField({
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
import { FieldBase, SingleRelationshipField } from "payload/dist/fields/config/types";
|
|
||||||
import { Collections } from "../../constants";
|
|
||||||
|
|
||||||
type KeysField = FieldBase & {
|
|
||||||
admin?: SingleRelationshipField["admin"];
|
|
||||||
};
|
|
||||||
|
|
||||||
export const tagsField = ({ admin, ...props }: KeysField): SingleRelationshipField => ({
|
|
||||||
...props,
|
|
||||||
admin: {
|
|
||||||
allowCreate: false,
|
|
||||||
...admin,
|
|
||||||
},
|
|
||||||
type: "relationship",
|
|
||||||
hasMany: true,
|
|
||||||
relationTo: Collections.Tags,
|
|
||||||
});
|
|
|
@ -55,7 +55,6 @@ export interface Page {
|
||||||
slug: string;
|
slug: string;
|
||||||
thumbnail?: string | Image | null;
|
thumbnail?: string | Image | null;
|
||||||
backgroundImage?: string | Image | null;
|
backgroundImage?: string | Image | null;
|
||||||
tags?: (string | Tag)[] | null;
|
|
||||||
attributes?: (TagsBlock | NumberBlock | TextBlock)[] | null;
|
attributes?: (TagsBlock | NumberBlock | TextBlock)[] | null;
|
||||||
translations: {
|
translations: {
|
||||||
language: string | Language;
|
language: string | Language;
|
||||||
|
@ -133,7 +132,6 @@ export interface Image {
|
||||||
id?: string | null;
|
id?: string | null;
|
||||||
}[]
|
}[]
|
||||||
| null;
|
| null;
|
||||||
tags?: (string | Tag)[] | null;
|
|
||||||
attributes?: (TagsBlock | NumberBlock | TextBlock)[] | null;
|
attributes?: (TagsBlock | NumberBlock | TextBlock)[] | null;
|
||||||
credits?: Credits;
|
credits?: Credits;
|
||||||
updatedAt: string;
|
updatedAt: string;
|
||||||
|
@ -171,22 +169,6 @@ export interface Language {
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* This interface was referenced by `Config`'s JSON-Schema
|
|
||||||
* via the `definition` "tags".
|
|
||||||
*/
|
|
||||||
export interface Tag {
|
|
||||||
id: string;
|
|
||||||
slug: string;
|
|
||||||
page?: (string | null) | Page;
|
|
||||||
translations: {
|
|
||||||
language: string | Language;
|
|
||||||
name: string;
|
|
||||||
id?: string | null;
|
|
||||||
}[];
|
|
||||||
updatedAt: string;
|
|
||||||
createdAt: string;
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* This interface was referenced by `Config`'s JSON-Schema
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
* via the `definition` "TagsBlock".
|
* via the `definition` "TagsBlock".
|
||||||
|
@ -215,6 +197,22 @@ export interface Attribute {
|
||||||
updatedAt: string;
|
updatedAt: string;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
|
* via the `definition` "tags".
|
||||||
|
*/
|
||||||
|
export interface Tag {
|
||||||
|
id: string;
|
||||||
|
slug: string;
|
||||||
|
page?: (string | null) | Page;
|
||||||
|
translations: {
|
||||||
|
language: string | Language;
|
||||||
|
name: string;
|
||||||
|
id?: string | null;
|
||||||
|
}[];
|
||||||
|
updatedAt: string;
|
||||||
|
createdAt: string;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* This interface was referenced by `Config`'s JSON-Schema
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
* via the `definition` "NumberBlock".
|
* via the `definition` "NumberBlock".
|
||||||
|
@ -373,7 +371,6 @@ export interface Collectible {
|
||||||
thumbnail?: string | Image | null;
|
thumbnail?: string | Image | null;
|
||||||
nature: "Physical" | "Digital";
|
nature: "Physical" | "Digital";
|
||||||
languages?: (string | Language)[] | null;
|
languages?: (string | Language)[] | null;
|
||||||
tags?: (string | Tag)[] | null;
|
|
||||||
attributes?: (TagsBlock | NumberBlock | TextBlock)[] | null;
|
attributes?: (TagsBlock | NumberBlock | TextBlock)[] | null;
|
||||||
translations: {
|
translations: {
|
||||||
language: string | Language;
|
language: string | Language;
|
||||||
|
@ -638,7 +635,6 @@ export interface Audio {
|
||||||
} | null;
|
} | null;
|
||||||
id?: string | null;
|
id?: string | null;
|
||||||
}[];
|
}[];
|
||||||
tags?: (string | Tag)[] | null;
|
|
||||||
attributes?: (TagsBlock | NumberBlock | TextBlock)[] | null;
|
attributes?: (TagsBlock | NumberBlock | TextBlock)[] | null;
|
||||||
credits?: Credits;
|
credits?: Credits;
|
||||||
updatedAt: string;
|
updatedAt: string;
|
||||||
|
@ -714,7 +710,6 @@ export interface Video {
|
||||||
subfile?: string | VideoSubtitle | null;
|
subfile?: string | VideoSubtitle | null;
|
||||||
id?: string | null;
|
id?: string | null;
|
||||||
}[];
|
}[];
|
||||||
tags?: (string | Tag)[] | null;
|
|
||||||
attributes?: (TagsBlock | NumberBlock | TextBlock)[] | null;
|
attributes?: (TagsBlock | NumberBlock | TextBlock)[] | null;
|
||||||
credits?: Credits;
|
credits?: Credits;
|
||||||
platformEnabled?: boolean | null;
|
platformEnabled?: boolean | null;
|
||||||
|
|
Loading…
Reference in New Issue