@payloadcms/plugin-seo 3.0.0-canary.a192632 → 3.0.0-canary.a6e7305
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fields/MetaDescription/MetaDescriptionComponent.d.ts +3 -3
- package/dist/fields/MetaDescription/MetaDescriptionComponent.d.ts.map +1 -1
- package/dist/fields/MetaDescription/MetaDescriptionComponent.js +37 -12
- package/dist/fields/MetaDescription/MetaDescriptionComponent.js.map +1 -1
- package/dist/fields/MetaImage/MetaImageComponent.d.ts +3 -3
- package/dist/fields/MetaImage/MetaImageComponent.d.ts.map +1 -1
- package/dist/fields/MetaImage/MetaImageComponent.js +40 -16
- package/dist/fields/MetaImage/MetaImageComponent.js.map +1 -1
- package/dist/fields/MetaTitle/MetaTitleComponent.d.ts +3 -3
- package/dist/fields/MetaTitle/MetaTitleComponent.d.ts.map +1 -1
- package/dist/fields/MetaTitle/MetaTitleComponent.js +37 -12
- package/dist/fields/MetaTitle/MetaTitleComponent.js.map +1 -1
- package/dist/fields/Overview/OverviewComponent.d.ts +8 -0
- package/dist/fields/Overview/OverviewComponent.d.ts.map +1 -1
- package/dist/fields/Overview/OverviewComponent.js +13 -7
- package/dist/fields/Overview/OverviewComponent.js.map +1 -1
- package/dist/fields/Overview/index.d.ts +8 -0
- package/dist/fields/Overview/index.d.ts.map +1 -1
- package/dist/fields/Overview/index.js +3 -1
- package/dist/fields/Overview/index.js.map +1 -1
- package/dist/fields/Preview/PreviewComponent.d.ts +3 -3
- package/dist/fields/Preview/PreviewComponent.d.ts.map +1 -1
- package/dist/fields/Preview/PreviewComponent.js +23 -9
- package/dist/fields/Preview/PreviewComponent.js.map +1 -1
- package/dist/fields/index.scss +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +61 -30
- package/dist/index.js.map +1 -1
- package/dist/translations/cs.d.ts +3 -0
- package/dist/translations/cs.d.ts.map +1 -0
- package/dist/translations/cs.js +25 -0
- package/dist/translations/cs.js.map +1 -0
- package/dist/translations/de.d.ts +3 -0
- package/dist/translations/de.d.ts.map +1 -0
- package/dist/translations/de.js +25 -0
- package/dist/translations/de.js.map +1 -0
- package/dist/translations/en.d.ts +3 -0
- package/dist/translations/en.d.ts.map +1 -0
- package/dist/translations/en.js +25 -0
- package/dist/translations/en.js.map +1 -0
- package/dist/translations/es.d.ts +3 -0
- package/dist/translations/es.d.ts.map +1 -0
- package/dist/translations/es.js +25 -0
- package/dist/translations/es.js.map +1 -0
- package/dist/translations/fa.d.ts +3 -0
- package/dist/translations/fa.d.ts.map +1 -0
- package/dist/translations/fa.js +25 -0
- package/dist/translations/fa.js.map +1 -0
- package/dist/translations/fr.d.ts +3 -0
- package/dist/translations/fr.d.ts.map +1 -0
- package/dist/translations/fr.js +25 -0
- package/dist/translations/fr.js.map +1 -0
- package/dist/translations/index.d.ts +15 -178
- package/dist/translations/index.d.ts.map +1 -1
- package/dist/translations/index.js +26 -176
- package/dist/translations/index.js.map +1 -1
- package/dist/translations/it.d.ts +3 -0
- package/dist/translations/it.d.ts.map +1 -0
- package/dist/translations/it.js +25 -0
- package/dist/translations/it.js.map +1 -0
- package/dist/translations/nb.d.ts +3 -0
- package/dist/translations/nb.d.ts.map +1 -0
- package/dist/translations/nb.js +25 -0
- package/dist/translations/nb.js.map +1 -0
- package/dist/translations/pl.d.ts +3 -0
- package/dist/translations/pl.d.ts.map +1 -0
- package/dist/translations/pl.js +25 -0
- package/dist/translations/pl.js.map +1 -0
- package/dist/translations/ru.d.ts +3 -0
- package/dist/translations/ru.d.ts.map +1 -0
- package/dist/translations/ru.js +25 -0
- package/dist/translations/ru.js.map +1 -0
- package/dist/translations/sv.d.ts +3 -0
- package/dist/translations/sv.d.ts.map +1 -0
- package/dist/translations/sv.js +25 -0
- package/dist/translations/sv.js.map +1 -0
- package/dist/translations/tr.d.ts +3 -0
- package/dist/translations/tr.d.ts.map +1 -0
- package/dist/translations/tr.js +25 -0
- package/dist/translations/tr.js.map +1 -0
- package/dist/translations/translation-schema.json +5 -1
- package/dist/translations/uk.d.ts +3 -0
- package/dist/translations/uk.d.ts.map +1 -0
- package/dist/translations/uk.js +25 -0
- package/dist/translations/uk.js.map +1 -0
- package/dist/translations/vi.d.ts +3 -0
- package/dist/translations/vi.d.ts.map +1 -0
- package/dist/translations/vi.js +25 -0
- package/dist/translations/vi.js.map +1 -0
- package/dist/types.d.ts +44 -11
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/ui/LengthIndicator.js +1 -1
- package/dist/ui/LengthIndicator.js.map +1 -1
- package/package.json +17 -17
- package/dist/translations/en.json +0 -22
- package/dist/translations/es.json +0 -22
- package/dist/translations/fa.json +0 -22
- package/dist/translations/fr.json +0 -22
- package/dist/translations/pl.json +0 -22
- package/dist/translations/ru.json +0 -22
- package/dist/translations/uk.json +0 -22
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/fields/Overview/OverviewComponent.tsx"],"sourcesContent":["'use client'\n\nimport type { FormField, UIField } from 'payload'\n\nimport { useAllFormFields, useForm, useTranslation } from '@payloadcms/ui'\nimport React, { useCallback, useEffect, useState } from 'react'\n\nimport type { PluginSEOTranslationKeys, PluginSEOTranslations } from '../../translations/index.js'\n\nimport { defaults } from '../../defaults.js'\n\nconst {\n description: { maxLength:
|
|
1
|
+
{"version":3,"sources":["../../../src/fields/Overview/OverviewComponent.tsx"],"sourcesContent":["'use client'\n\nimport type { FormField, UIField } from 'payload'\n\nimport { useAllFormFields, useForm, useTranslation } from '@payloadcms/ui'\nimport React, { useCallback, useEffect, useState } from 'react'\n\nimport type { PluginSEOTranslationKeys, PluginSEOTranslations } from '../../translations/index.js'\n\nimport { defaults } from '../../defaults.js'\n\nconst {\n description: { maxLength: maxDescDefault, minLength: minDescDefault },\n title: { maxLength: maxTitleDefault, minLength: minTitleDefault },\n} = defaults\n\ntype OverviewProps = {\n descriptionOverrides?: {\n maxLength?: number\n minLength?: number\n }\n descriptionPath?: string\n imagePath?: string\n titleOverrides?: {\n maxLength?: number\n minLength?: number\n }\n titlePath?: string\n} & UIField\n\nexport const OverviewComponent: React.FC<OverviewProps> = ({\n descriptionOverrides,\n descriptionPath: descriptionPathFromContext,\n imagePath: imagePathFromContext,\n titleOverrides,\n titlePath: titlePathFromContext,\n}) => {\n const { getFields } = useForm()\n\n const descriptionPath = descriptionPathFromContext || 'meta.description'\n const titlePath = titlePathFromContext || 'meta.title'\n const imagePath = imagePathFromContext || 'meta.image'\n\n const [\n {\n [descriptionPath]: { value: metaDesc } = {} as FormField,\n [imagePath]: { value: metaImage } = {} as FormField,\n [titlePath]: { value: metaTitle } = {} as FormField,\n },\n ] = useAllFormFields()\n const { t } = useTranslation<PluginSEOTranslations, PluginSEOTranslationKeys>()\n\n const [titleIsValid, setTitleIsValid] = useState<boolean | undefined>()\n const [descIsValid, setDescIsValid] = useState<boolean | undefined>()\n const [imageIsValid, setImageIsValid] = useState<boolean | undefined>()\n\n const minDesc = descriptionOverrides?.minLength || minDescDefault\n const maxDesc = descriptionOverrides?.maxLength || maxDescDefault\n const minTitle = titleOverrides?.minLength || minTitleDefault\n const maxTitle = titleOverrides?.maxLength || maxTitleDefault\n\n const resetAll = useCallback(() => {\n const fields = getFields()\n const fieldsWithoutMeta = fields\n fieldsWithoutMeta['meta.title'].value = ''\n fieldsWithoutMeta['meta.description'].value = ''\n fieldsWithoutMeta['meta.image'].value = ''\n // dispatchFields(fieldsWithoutMeta);\n }, [getFields])\n\n useEffect(() => {\n if (typeof metaTitle === 'string') {\n setTitleIsValid(metaTitle.length >= minTitle && metaTitle.length <= maxTitle)\n }\n if (typeof metaDesc === 'string') {\n setDescIsValid(metaDesc.length >= minDesc && metaDesc.length <= maxDesc)\n }\n setImageIsValid(Boolean(metaImage))\n }, [metaTitle, metaDesc, metaImage])\n\n const testResults = [titleIsValid, descIsValid, imageIsValid]\n\n const numberOfPasses = testResults.filter(Boolean).length\n\n return (\n <div\n style={{\n marginBottom: '20px',\n }}\n >\n <div>\n {t('plugin-seo:checksPassing', { current: numberOfPasses, max: testResults.length })}\n </div>\n </div>\n )\n}\n"],"names":["useAllFormFields","useForm","useTranslation","React","useCallback","useEffect","useState","defaults","description","maxLength","maxDescDefault","minLength","minDescDefault","title","maxTitleDefault","minTitleDefault","OverviewComponent","descriptionOverrides","descriptionPath","descriptionPathFromContext","imagePath","imagePathFromContext","titleOverrides","titlePath","titlePathFromContext","getFields","value","metaDesc","metaImage","metaTitle","t","titleIsValid","setTitleIsValid","descIsValid","setDescIsValid","imageIsValid","setImageIsValid","minDesc","maxDesc","minTitle","maxTitle","resetAll","fields","fieldsWithoutMeta","length","Boolean","testResults","numberOfPasses","filter","div","style","marginBottom","current","max"],"mappings":"AAAA;;AAIA,SAASA,gBAAgB,EAAEC,OAAO,EAAEC,cAAc,QAAQ,iBAAgB;AAC1E,OAAOC,SAASC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,QAAO;AAI/D,SAASC,QAAQ,QAAQ,oBAAmB;AAE5C,MAAM,EACJC,aAAa,EAAEC,WAAWC,cAAc,EAAEC,WAAWC,cAAc,EAAE,EACrEC,OAAO,EAAEJ,WAAWK,eAAe,EAAEH,WAAWI,eAAe,EAAE,EAClE,GAAGR;AAgBJ,OAAO,MAAMS,oBAA6C,CAAC,EACzDC,oBAAoB,EACpBC,iBAAiBC,0BAA0B,EAC3CC,WAAWC,oBAAoB,EAC/BC,cAAc,EACdC,WAAWC,oBAAoB,EAChC;IACC,MAAM,EAAEC,SAAS,EAAE,GAAGxB;IAEtB,MAAMiB,kBAAkBC,8BAA8B;IACtD,MAAMI,YAAYC,wBAAwB;IAC1C,MAAMJ,YAAYC,wBAAwB;IAE1C,MAAM,CACJ,EACE,CAACH,gBAAgB,EAAE,EAAEQ,OAAOC,QAAQ,EAAE,GAAG,CAAC,CAAc,EACxD,CAACP,UAAU,EAAE,EAAEM,OAAOE,SAAS,EAAE,GAAG,CAAC,CAAc,EACnD,CAACL,UAAU,EA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
|
|
1
1
|
import type { UIField } from 'payload';
|
|
2
2
|
interface FieldFunctionProps {
|
|
3
|
+
descriptionOverrides?: {
|
|
4
|
+
maxLength?: number;
|
|
5
|
+
minLength?: number;
|
|
6
|
+
};
|
|
3
7
|
/**
|
|
4
8
|
* Path to the description field to use for the preview
|
|
5
9
|
*
|
|
@@ -13,6 +17,10 @@ interface FieldFunctionProps {
|
|
|
13
17
|
*/
|
|
14
18
|
imagePath?: string;
|
|
15
19
|
overrides?: Partial<UIField>;
|
|
20
|
+
titleOverrides?: {
|
|
21
|
+
maxLength?: number;
|
|
22
|
+
minLength?: number;
|
|
23
|
+
};
|
|
16
24
|
/**
|
|
17
25
|
* Path to the title field to use for the preview
|
|
18
26
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/Overview/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEtC,UAAU,kBAAkB;IAC1B;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,CAAA;IAC5B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,KAAK,aAAa,GAAG,CAAC,EAAE,SAAS,EAAE,EAAE,kBAAkB,KAAK,OAAO,CAAA;AAEnE,eAAO,MAAM,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/Overview/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEtC,UAAU,kBAAkB;IAC1B,oBAAoB,CAAC,EAAE;QACrB,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,CAAA;IACD;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,CAAA;IAC5B,cAAc,CAAC,EAAE;QACf,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,CAAA;IACD;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,KAAK,aAAa,GAAG,CAAC,EAAE,SAAS,EAAE,EAAE,kBAAkB,KAAK,OAAO,CAAA;AAEnE,eAAO,MAAM,aAAa,EAAE,aA4B3B,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const OverviewField = ({ descriptionPath, imagePath, overrides, titlePath })=>{
|
|
1
|
+
export const OverviewField = ({ descriptionOverrides, descriptionPath, imagePath, overrides, titleOverrides, titlePath })=>{
|
|
2
2
|
return {
|
|
3
3
|
name: 'overview',
|
|
4
4
|
type: 'ui',
|
|
@@ -6,8 +6,10 @@ export const OverviewField = ({ descriptionPath, imagePath, overrides, titlePath
|
|
|
6
6
|
components: {
|
|
7
7
|
Field: {
|
|
8
8
|
clientProps: {
|
|
9
|
+
descriptionOverrides,
|
|
9
10
|
descriptionPath,
|
|
10
11
|
imagePath,
|
|
12
|
+
titleOverrides,
|
|
11
13
|
titlePath
|
|
12
14
|
},
|
|
13
15
|
path: '@payloadcms/plugin-seo/client#OverviewComponent'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/fields/Overview/index.tsx"],"sourcesContent":["import type { UIField } from 'payload'\n\ninterface FieldFunctionProps {\n /**\n * Path to the description field to use for the preview\n *\n * @default 'meta.description'\n */\n descriptionPath?: string\n /**\n * Path to the image field to use for the preview\n *\n * @default 'meta.image'\n */\n imagePath?: string\n overrides?: Partial<UIField>\n /**\n * Path to the title field to use for the preview\n *\n * @default 'meta.title'\n */\n titlePath?: string\n}\n\ntype FieldFunction = ({ overrides }: FieldFunctionProps) => UIField\n\nexport const OverviewField: FieldFunction = ({\n descriptionPath,\n imagePath,\n overrides,\n titlePath,\n}) => {\n return {\n name: 'overview',\n type: 'ui',\n admin: {\n components: {\n Field: {\n clientProps: {\n descriptionPath,\n imagePath,\n titlePath,\n },\n path: '@payloadcms/plugin-seo/client#OverviewComponent',\n },\n },\n },\n label: 'Overview',\n ...((overrides as unknown as UIField) ?? {}),\n }\n}\n"],"names":["OverviewField","descriptionPath","imagePath","overrides","titlePath","name","type","admin","components","Field","clientProps","path","label"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/fields/Overview/index.tsx"],"sourcesContent":["import type { UIField } from 'payload'\n\ninterface FieldFunctionProps {\n descriptionOverrides?: {\n maxLength?: number\n minLength?: number\n }\n /**\n * Path to the description field to use for the preview\n *\n * @default 'meta.description'\n */\n descriptionPath?: string\n /**\n * Path to the image field to use for the preview\n *\n * @default 'meta.image'\n */\n imagePath?: string\n overrides?: Partial<UIField>\n titleOverrides?: {\n maxLength?: number\n minLength?: number\n }\n /**\n * Path to the title field to use for the preview\n *\n * @default 'meta.title'\n */\n titlePath?: string\n}\n\ntype FieldFunction = ({ overrides }: FieldFunctionProps) => UIField\n\nexport const OverviewField: FieldFunction = ({\n descriptionOverrides,\n descriptionPath,\n imagePath,\n overrides,\n titleOverrides,\n titlePath,\n}) => {\n return {\n name: 'overview',\n type: 'ui',\n admin: {\n components: {\n Field: {\n clientProps: {\n descriptionOverrides,\n descriptionPath,\n imagePath,\n titleOverrides,\n titlePath,\n },\n path: '@payloadcms/plugin-seo/client#OverviewComponent',\n },\n },\n },\n label: 'Overview',\n ...((overrides as unknown as UIField) ?? {}),\n }\n}\n"],"names":["OverviewField","descriptionOverrides","descriptionPath","imagePath","overrides","titleOverrides","titlePath","name","type","admin","components","Field","clientProps","path","label"],"mappings":"AAkCA,OAAO,MAAMA,gBAA+B,CAAC,EAC3CC,oBAAoB,EACpBC,eAAe,EACfC,SAAS,EACTC,SAAS,EACTC,cAAc,EACdC,SAAS,EACV;IACC,OAAO;QACLC,MAAM;QACNC,MAAM;QACNC,OAAO;YACLC,YAAY;gBACVC,OAAO;oBACLC,aAAa;wBACXX;wBACAC;wBACAC;wBACAE;wBACAC;oBACF;oBACAO,MAAM;gBACR;YACF;QACF;QACAC,OAAO;QACP,GAAI,AAACV,aAAoC,CAAC,CAAC;IAC7C;AACF,EAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { UIField } from 'payload';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
type PreviewProps = {
|
|
4
|
-
descriptionPath?: string;
|
|
5
|
-
hasGenerateURLFn: boolean;
|
|
6
|
-
titlePath?: string;
|
|
4
|
+
readonly descriptionPath?: string;
|
|
5
|
+
readonly hasGenerateURLFn: boolean;
|
|
6
|
+
readonly titlePath?: string;
|
|
7
7
|
} & UIField;
|
|
8
8
|
export declare const PreviewComponent: React.FC<PreviewProps>;
|
|
9
9
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreviewComponent.d.ts","sourceRoot":"","sources":["../../../src/fields/Preview/PreviewComponent.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAa,OAAO,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"PreviewComponent.d.ts","sourceRoot":"","sources":["../../../src/fields/Preview/PreviewComponent.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAa,OAAO,EAAE,MAAM,SAAS,CAAA;AAUjD,OAAO,KAA8B,MAAM,OAAO,CAAA;AAKlD,KAAK,YAAY,GAAG;IAClB,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAA;IACjC,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAA;IAClC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC5B,GAAG,OAAO,CAAA;AAEX,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CA8HnD,CAAA"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useAllFormFields, useDocumentInfo, useForm, useLocale, useTranslation } from '@payloadcms/ui';
|
|
3
|
+
import { useAllFormFields, useConfig, useDocumentInfo, useForm, useLocale, useTranslation } from '@payloadcms/ui';
|
|
4
4
|
import React, { useEffect, useState } from 'react';
|
|
5
|
-
export const PreviewComponent = (
|
|
5
|
+
export const PreviewComponent = (props)=>{
|
|
6
|
+
const { descriptionPath: descriptionPathFromContext, hasGenerateURLFn, titlePath: titlePathFromContext } = props;
|
|
6
7
|
const { t } = useTranslation();
|
|
8
|
+
const { config: { routes: { api }, serverURL } } = useConfig();
|
|
7
9
|
const locale = useLocale();
|
|
8
10
|
const [fields] = useAllFormFields();
|
|
9
11
|
const { getData } = useForm();
|
|
@@ -13,14 +15,21 @@ export const PreviewComponent = ({ descriptionPath: descriptionPathFromContext,
|
|
|
13
15
|
const { [descriptionPath]: { value: metaDescription } = {}, [titlePath]: { value: metaTitle } = {} } = fields;
|
|
14
16
|
const [href, setHref] = useState();
|
|
15
17
|
useEffect(()=>{
|
|
18
|
+
const endpoint = `${serverURL}${api}/plugin-seo/generate-url`;
|
|
16
19
|
const getHref = async ()=>{
|
|
17
|
-
const genURLResponse = await fetch(
|
|
20
|
+
const genURLResponse = await fetch(endpoint, {
|
|
18
21
|
body: JSON.stringify({
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
id: docInfo.id,
|
|
23
|
+
collectionSlug: docInfo.collectionSlug,
|
|
24
|
+
doc: getData(),
|
|
25
|
+
docPermissions: docInfo.docPermissions,
|
|
26
|
+
globalSlug: docInfo.globalSlug,
|
|
27
|
+
hasPublishPermission: docInfo.hasPublishPermission,
|
|
28
|
+
hasSavePermission: docInfo.hasSavePermission,
|
|
29
|
+
initialData: docInfo.initialData,
|
|
30
|
+
initialState: docInfo.initialState,
|
|
31
|
+
locale: typeof locale === 'object' ? locale?.code : locale,
|
|
32
|
+
title: docInfo.title
|
|
24
33
|
}),
|
|
25
34
|
credentials: 'include',
|
|
26
35
|
headers: {
|
|
@@ -40,9 +49,14 @@ export const PreviewComponent = ({ descriptionPath: descriptionPathFromContext,
|
|
|
40
49
|
locale,
|
|
41
50
|
docInfo,
|
|
42
51
|
hasGenerateURLFn,
|
|
43
|
-
getData
|
|
52
|
+
getData,
|
|
53
|
+
serverURL,
|
|
54
|
+
api
|
|
44
55
|
]);
|
|
45
56
|
return /*#__PURE__*/ _jsxs("div", {
|
|
57
|
+
style: {
|
|
58
|
+
marginBottom: '20px'
|
|
59
|
+
},
|
|
46
60
|
children: [
|
|
47
61
|
/*#__PURE__*/ _jsx("div", {
|
|
48
62
|
children: t('plugin-seo:preview')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/fields/Preview/PreviewComponent.tsx"],"sourcesContent":["'use client'\n\nimport type { FormField, UIField } from 'payload'\n\nimport {\n useAllFormFields,\n useDocumentInfo,\n useForm,\n useLocale,\n useTranslation,\n} from '@payloadcms/ui'\nimport React, { useEffect, useState } from 'react'\n\nimport type { PluginSEOTranslationKeys, PluginSEOTranslations } from '../../translations/index.js'\nimport type { GenerateURL } from '../../types.js'\n\ntype PreviewProps = {\n descriptionPath?: string\n hasGenerateURLFn: boolean\n titlePath?: string\n} & UIField\n\nexport const PreviewComponent: React.FC<PreviewProps> = ({\n descriptionPath: descriptionPathFromContext,\n
|
|
1
|
+
{"version":3,"sources":["../../../src/fields/Preview/PreviewComponent.tsx"],"sourcesContent":["'use client'\n\nimport type { FormField, UIField } from 'payload'\n\nimport {\n useAllFormFields,\n useConfig,\n useDocumentInfo,\n useForm,\n useLocale,\n useTranslation,\n} from '@payloadcms/ui'\nimport React, { useEffect, useState } from 'react'\n\nimport type { PluginSEOTranslationKeys, PluginSEOTranslations } from '../../translations/index.js'\nimport type { GenerateURL } from '../../types.js'\n\ntype PreviewProps = {\n readonly descriptionPath?: string\n readonly hasGenerateURLFn: boolean\n readonly titlePath?: string\n} & UIField\n\nexport const PreviewComponent: React.FC<PreviewProps> = (props) => {\n const {\n descriptionPath: descriptionPathFromContext,\n hasGenerateURLFn,\n titlePath: titlePathFromContext,\n } = props\n\n const { t } = useTranslation<PluginSEOTranslations, PluginSEOTranslationKeys>()\n\n const {\n config: {\n routes: { api },\n serverURL,\n },\n } = useConfig()\n\n const locale = useLocale()\n const [fields] = useAllFormFields()\n const { getData } = useForm()\n const docInfo = useDocumentInfo()\n\n const descriptionPath = descriptionPathFromContext || 'meta.description'\n const titlePath = titlePathFromContext || 'meta.title'\n\n const {\n [descriptionPath]: { value: metaDescription } = {} as FormField,\n [titlePath]: { value: metaTitle } = {} as FormField,\n } = fields\n\n const [href, setHref] = useState<string>()\n\n useEffect(() => {\n const endpoint = `${serverURL}${api}/plugin-seo/generate-url`\n\n const getHref = async () => {\n const genURLResponse = await fetch(endpoint, {\n body: JSON.stringify({\n id: docInfo.id,\n collectionSlug: docInfo.collectionSlug,\n doc: getData(),\n docPermissions: docInfo.docPermissions,\n globalSlug: docInfo.globalSlug,\n hasPublishPermission: docInfo.hasPublishPermission,\n hasSavePermission: docInfo.hasSavePermission,\n initialData: docInfo.initialData,\n initialState: docInfo.initialState,\n locale: typeof locale === 'object' ? locale?.code : locale,\n title: docInfo.title,\n } satisfies Omit<Parameters<GenerateURL>[0], 'collectionConfig' | 'globalConfig' | 'req'>),\n credentials: 'include',\n headers: {\n 'Content-Type': 'application/json',\n },\n method: 'POST',\n })\n\n const { result: newHref } = await genURLResponse.json()\n\n setHref(newHref)\n }\n\n if (hasGenerateURLFn && !href) {\n void getHref()\n }\n }, [fields, href, locale, docInfo, hasGenerateURLFn, getData, serverURL, api])\n\n return (\n <div\n style={{\n marginBottom: '20px',\n }}\n >\n <div>{t('plugin-seo:preview')}</div>\n <div\n style={{\n color: '#9A9A9A',\n marginBottom: '5px',\n }}\n >\n {t('plugin-seo:previewDescription')}\n </div>\n <div\n style={{\n background: 'var(--theme-elevation-50)',\n borderRadius: '5px',\n boxShadow: '0px 0px 10px rgba(0, 0, 0, 0.1)',\n maxWidth: '600px',\n padding: '20px',\n pointerEvents: 'none',\n width: '100%',\n }}\n >\n <div>\n <a\n href={href}\n style={{\n textDecoration: 'none',\n }}\n >\n {href || 'https://...'}\n </a>\n </div>\n <h4\n style={{\n margin: 0,\n }}\n >\n <a\n href=\"/\"\n style={{\n textDecoration: 'none',\n }}\n >\n {metaTitle as string}\n </a>\n </h4>\n <p\n style={{\n margin: 0,\n }}\n >\n {metaDescription as string}\n </p>\n </div>\n </div>\n )\n}\n"],"names":["useAllFormFields","useConfig","useDocumentInfo","useForm","useLocale","useTranslation","React","useEffect","useState","PreviewComponent","props","descriptionPath","descriptionPathFromContext","hasGenerateURLFn","titlePath","titlePathFromContext","t","config","routes","api","serverURL","locale","fields","getData","docInfo","value","metaDescription","metaTitle","href","setHref","endpoint","getHref","genURLResponse","fetch","body","JSON","stringify","id","collectionSlug","doc","docPermissions","globalSlug","hasPublishPermission","hasSavePermission","initialData","initialState","code","title","credentials","headers","method","result","newHref","json","div","style","marginBottom","color","background","borderRadius","boxShadow","maxWidth","padding","pointerEvents","width","a","textDecoration","h4","margin","p"],"mappings":"AAAA;;AAIA,SACEA,gBAAgB,EAChBC,SAAS,EACTC,eAAe,EACfC,OAAO,EACPC,SAAS,EACTC,cAAc,QACT,iBAAgB;AACvB,OAAOC,SAASC,SAAS,EAAEC,QAAQ,QAAQ,QAAO;AAWlD,OAAO,MAAMC,mBAA2C,CAACC;IACvD,MAAM,EACJC,iBAAiBC,0BAA0B,EAC3CC,gBAAgB,EAChBC,WAAWC,oBAAoB,EAChC,GAAGL;IAEJ,MAAM,EAAEM,CAAC,EAAE,GAAGX;IAEd,MAAM,EACJY,QAAQ,EACNC,QAAQ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AQG;QAASX;QAAkBU;QAASH;QAAWD;KAAI;IAE7E,qBACE,MAACmC;QACCC,OAAO;YACLC,cAAc;QAChB;;0BAEA,KAACF;0BAAKtC,EAAE;;0BACR,KAACsC;gBACCC,OAAO;oBACLE,OAAO;oBACPD,cAAc;gBAChB;0BAECxC,EAAE;;0BAEL,MAACsC;gBACCC,OAAO;oBACLG,YAAY;oBACZC,cAAc;oBACdC,WAAW;oBACXC,UAAU;oBACVC,SAAS;oBACTC,eAAe;oBACfC,OAAO;gBACT;;kCAEA,KAACV;kCACC,cAAA,KAACW;4BACCrC,MAAMA;4BACN2B,OAAO;gCACLW,gBAAgB;4BAClB;sCAECtC,QAAQ;;;kCAGb,KAACuC;wBACCZ,OAAO;4BACLa,QAAQ;wBACV;kCAEA,cAAA,KAACH;4BACCrC,MAAK;4BACL2B,OAAO;gCACLW,gBAAgB;4BAClB;sCAECvC;;;kCAGL,KAAC0C;wBACCd,OAAO;4BACLa,QAAQ;wBACV;kCAEC1C;;;;;;AAKX,EAAC"}
|
package/dist/fields/index.scss
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAgC,MAAM,SAAS,CAAA;AAInE,OAAO,KAAK,EAKV,eAAe,EAChB,MAAM,YAAY,CAAA;AASnB,eAAO,MAAM,SAAS,iBACL,eAAe,cACrB,MAAM,KAAG,MAqRjB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { addDataAndFileToRequest } from '@payloadcms/next/utilities';
|
|
2
1
|
import { deepMergeSimple } from 'payload/shared';
|
|
3
2
|
import { MetaDescriptionField } from './fields/MetaDescription/index.js';
|
|
4
3
|
import { MetaImageField } from './fields/MetaImage/index.js';
|
|
@@ -7,31 +6,32 @@ import { OverviewField } from './fields/Overview/index.js';
|
|
|
7
6
|
import { PreviewField } from './fields/Preview/index.js';
|
|
8
7
|
import { translations } from './translations/index.js';
|
|
9
8
|
export const seoPlugin = (pluginConfig)=>(config)=>{
|
|
9
|
+
const defaultFields = [
|
|
10
|
+
OverviewField({}),
|
|
11
|
+
MetaTitleField({
|
|
12
|
+
hasGenerateFn: typeof pluginConfig?.generateTitle === 'function'
|
|
13
|
+
}),
|
|
14
|
+
MetaDescriptionField({
|
|
15
|
+
hasGenerateFn: typeof pluginConfig?.generateDescription === 'function'
|
|
16
|
+
}),
|
|
17
|
+
...pluginConfig?.uploadsCollection ? [
|
|
18
|
+
MetaImageField({
|
|
19
|
+
hasGenerateFn: typeof pluginConfig?.generateImage === 'function',
|
|
20
|
+
relationTo: pluginConfig.uploadsCollection
|
|
21
|
+
})
|
|
22
|
+
] : [],
|
|
23
|
+
PreviewField({
|
|
24
|
+
hasGenerateFn: typeof pluginConfig?.generateURL === 'function'
|
|
25
|
+
})
|
|
26
|
+
];
|
|
10
27
|
const seoFields = [
|
|
11
28
|
{
|
|
12
29
|
name: 'meta',
|
|
13
30
|
type: 'group',
|
|
14
31
|
fields: [
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
overrides: pluginConfig?.fieldOverrides?.title
|
|
19
|
-
}),
|
|
20
|
-
MetaDescriptionField({
|
|
21
|
-
hasGenerateFn: typeof pluginConfig?.generateDescription === 'function',
|
|
22
|
-
overrides: pluginConfig?.fieldOverrides?.description
|
|
23
|
-
}),
|
|
24
|
-
...pluginConfig?.uploadsCollection ? [
|
|
25
|
-
MetaImageField({
|
|
26
|
-
hasGenerateFn: typeof pluginConfig?.generateImage === 'function',
|
|
27
|
-
overrides: pluginConfig?.fieldOverrides?.image,
|
|
28
|
-
relationTo: pluginConfig.uploadsCollection
|
|
29
|
-
})
|
|
30
|
-
] : [],
|
|
31
|
-
...pluginConfig?.fields || [],
|
|
32
|
-
PreviewField({
|
|
33
|
-
hasGenerateFn: typeof pluginConfig?.generateURL === 'function'
|
|
34
|
-
})
|
|
32
|
+
...pluginConfig?.fields && typeof pluginConfig.fields === 'function' ? pluginConfig.fields({
|
|
33
|
+
defaultFields
|
|
34
|
+
}) : defaultFields
|
|
35
35
|
],
|
|
36
36
|
interfaceName: pluginConfig.interfaceName,
|
|
37
37
|
label: 'SEO'
|
|
@@ -103,9 +103,16 @@ export const seoPlugin = (pluginConfig)=>(config)=>{
|
|
|
103
103
|
...config.endpoints ?? [],
|
|
104
104
|
{
|
|
105
105
|
handler: async (req)=>{
|
|
106
|
-
await
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
const data = await req.json();
|
|
107
|
+
if (data) {
|
|
108
|
+
req.data = data;
|
|
109
|
+
}
|
|
110
|
+
const result = pluginConfig.generateTitle ? await pluginConfig.generateTitle({
|
|
111
|
+
...data,
|
|
112
|
+
collectionConfig: req.data.collectionSlug ? config.collections?.find((c)=>c.slug === req.data.collectionSlug) : null,
|
|
113
|
+
globalConfig: req.data.globalSlug ? config.globals?.find((g)=>g.slug === req.data.globalSlug) : null,
|
|
114
|
+
req
|
|
115
|
+
}) : '';
|
|
109
116
|
return new Response(JSON.stringify({
|
|
110
117
|
result
|
|
111
118
|
}), {
|
|
@@ -117,8 +124,16 @@ export const seoPlugin = (pluginConfig)=>(config)=>{
|
|
|
117
124
|
},
|
|
118
125
|
{
|
|
119
126
|
handler: async (req)=>{
|
|
120
|
-
await
|
|
121
|
-
|
|
127
|
+
const data = await req.json();
|
|
128
|
+
if (data) {
|
|
129
|
+
req.data = data;
|
|
130
|
+
}
|
|
131
|
+
const result = pluginConfig.generateDescription ? await pluginConfig.generateDescription({
|
|
132
|
+
...data,
|
|
133
|
+
collectionConfig: req.data.collectionSlug ? config.collections?.find((c)=>c.slug === req.data.collectionSlug) : null,
|
|
134
|
+
globalConfig: req.data.globalSlug ? config.globals?.find((g)=>g.slug === req.data.globalSlug) : null,
|
|
135
|
+
req
|
|
136
|
+
}) : '';
|
|
122
137
|
return new Response(JSON.stringify({
|
|
123
138
|
result
|
|
124
139
|
}), {
|
|
@@ -130,8 +145,16 @@ export const seoPlugin = (pluginConfig)=>(config)=>{
|
|
|
130
145
|
},
|
|
131
146
|
{
|
|
132
147
|
handler: async (req)=>{
|
|
133
|
-
await
|
|
134
|
-
|
|
148
|
+
const data = await req.json();
|
|
149
|
+
if (data) {
|
|
150
|
+
req.data = data;
|
|
151
|
+
}
|
|
152
|
+
const result = pluginConfig.generateURL ? await pluginConfig.generateURL({
|
|
153
|
+
...data,
|
|
154
|
+
collectionConfig: req.data.collectionSlug ? config.collections?.find((c)=>c.slug === req.data.collectionSlug) : null,
|
|
155
|
+
globalConfig: req.data.globalSlug ? config.globals?.find((g)=>g.slug === req.data.globalSlug) : null,
|
|
156
|
+
req
|
|
157
|
+
}) : '';
|
|
135
158
|
return new Response(JSON.stringify({
|
|
136
159
|
result
|
|
137
160
|
}), {
|
|
@@ -143,8 +166,16 @@ export const seoPlugin = (pluginConfig)=>(config)=>{
|
|
|
143
166
|
},
|
|
144
167
|
{
|
|
145
168
|
handler: async (req)=>{
|
|
146
|
-
await
|
|
147
|
-
|
|
169
|
+
const data = await req.json();
|
|
170
|
+
if (data) {
|
|
171
|
+
req.data = data;
|
|
172
|
+
}
|
|
173
|
+
const result = pluginConfig.generateImage ? await pluginConfig.generateImage({
|
|
174
|
+
...data,
|
|
175
|
+
collectionConfig: req.data.collectionSlug ? config.collections?.find((c)=>c.slug === req.data.collectionSlug) : null,
|
|
176
|
+
globalConfig: req.data.globalSlug ? config.globals?.find((g)=>g.slug === req.data.globalSlug) : null,
|
|
177
|
+
req
|
|
178
|
+
}) : '';
|
|
148
179
|
return new Response(result, {
|
|
149
180
|
status: 200
|
|
150
181
|
});
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.tsx"],"sourcesContent":["import type { Config, GroupField, TabsField, TextField } from 'payload'\n\nimport { addDataAndFileToRequest } from '@payloadcms/next/utilities'\nimport { deepMergeSimple } from 'payload/shared'\n\nimport type {\n GenerateDescription,\n GenerateImage,\n GenerateTitle,\n GenerateURL,\n SEOPluginConfig,\n} from './types.js'\n\nimport { MetaDescriptionField } from './fields/MetaDescription/index.js'\nimport { MetaImageField } from './fields/MetaImage/index.js'\nimport { MetaTitleField } from './fields/MetaTitle/index.js'\nimport { OverviewField } from './fields/Overview/index.js'\nimport { PreviewField } from './fields/Preview/index.js'\nimport { translations } from './translations/index.js'\n\nexport const seoPlugin =\n (pluginConfig: SEOPluginConfig) =>\n (config: Config): Config => {\n const seoFields: GroupField[] = [\n {\n name: 'meta',\n type: 'group',\n fields: [\n OverviewField({}),\n MetaTitleField({\n hasGenerateFn: typeof pluginConfig?.generateTitle === 'function',\n overrides: pluginConfig?.fieldOverrides?.title as unknown as TextField,\n }),\n MetaDescriptionField({\n hasGenerateFn: typeof pluginConfig?.generateDescription === 'function',\n overrides: pluginConfig?.fieldOverrides?.description,\n }),\n ...(pluginConfig?.uploadsCollection\n ? [\n MetaImageField({\n hasGenerateFn: typeof pluginConfig?.generateImage === 'function',\n overrides: pluginConfig?.fieldOverrides?.image,\n relationTo: pluginConfig.uploadsCollection,\n }),\n ]\n : []),\n ...(pluginConfig?.fields || []),\n PreviewField({\n hasGenerateFn: typeof pluginConfig?.generateURL === 'function',\n }),\n ],\n interfaceName: pluginConfig.interfaceName,\n label: 'SEO',\n },\n ]\n\n return {\n ...config,\n collections:\n config.collections?.map((collection) => {\n const { slug } = collection\n const isEnabled = pluginConfig?.collections?.includes(slug)\n\n if (isEnabled) {\n if (pluginConfig?.tabbedUI) {\n // prevent issues with auth enabled collections having an email field that shouldn't be moved to the SEO tab\n const emailField =\n (collection.auth ||\n !(typeof collection.auth === 'object' && collection.auth.disableLocalStrategy)) &&\n collection.fields?.find((field) => 'name' in field && field.name === 'email')\n const hasOnlyEmailField = collection.fields?.length === 1 && emailField\n\n const seoTabs: TabsField[] = hasOnlyEmailField\n ? [\n {\n type: 'tabs',\n tabs: [\n {\n fields: seoFields,\n label: 'SEO',\n },\n ],\n },\n ]\n : [\n {\n type: 'tabs',\n tabs: [\n // append a new tab onto the end of the tabs array, if there is one at the first index\n // if needed, create a new `Content` tab in the first index for this collection's base fields\n ...(collection?.fields?.[0]?.type === 'tabs' &&\n collection?.fields?.[0]?.tabs\n ? collection.fields[0].tabs\n : [\n {\n fields: [\n ...(emailField\n ? collection.fields.filter(\n (field) => 'name' in field && field.name !== 'email',\n )\n : collection.fields),\n ],\n label: collection?.labels?.singular || 'Content',\n },\n ]),\n {\n fields: seoFields,\n label: 'SEO',\n },\n ],\n },\n ]\n\n return {\n ...collection,\n fields: [\n ...(emailField ? [emailField] : []),\n ...seoTabs,\n ...(collection?.fields?.[0]?.type === 'tabs' ? collection.fields.slice(1) : []),\n ],\n }\n }\n\n return {\n ...collection,\n fields: [...(collection?.fields || []), ...seoFields],\n }\n }\n\n return collection\n }) || [],\n endpoints: [\n ...(config.endpoints ?? []),\n {\n handler: async (req) => {\n await addDataAndFileToRequest(req)\n req.t\n const result = pluginConfig.generateTitle\n ? await pluginConfig.generateTitle(\n req.data as unknown as Parameters<GenerateTitle>[0],\n )\n : ''\n return new Response(JSON.stringify({ result }), { status: 200 })\n },\n method: 'post',\n path: '/plugin-seo/generate-title',\n },\n {\n handler: async (req) => {\n await addDataAndFileToRequest(req)\n const result = pluginConfig.generateDescription\n ? await pluginConfig.generateDescription(\n req.data as unknown as Parameters<GenerateDescription>[0],\n )\n : ''\n return new Response(JSON.stringify({ result }), { status: 200 })\n },\n method: 'post',\n path: '/plugin-seo/generate-description',\n },\n {\n handler: async (req) => {\n await addDataAndFileToRequest(req)\n const result = pluginConfig.generateURL\n ? await pluginConfig.generateURL(req.data as unknown as Parameters<GenerateURL>[0])\n : ''\n return new Response(JSON.stringify({ result }), { status: 200 })\n },\n method: 'post',\n path: '/plugin-seo/generate-url',\n },\n {\n handler: async (req) => {\n await addDataAndFileToRequest(req)\n const result = pluginConfig.generateImage\n ? await pluginConfig.generateImage(\n req.data as unknown as Parameters<GenerateImage>[0],\n )\n : ''\n return new Response(result, { status: 200 })\n },\n method: 'post',\n path: '/plugin-seo/generate-image',\n },\n ],\n globals:\n config.globals?.map((global) => {\n const { slug } = global\n const isEnabled = pluginConfig?.globals?.includes(slug)\n\n if (isEnabled) {\n if (pluginConfig?.tabbedUI) {\n const seoTabs: TabsField[] = [\n {\n type: 'tabs',\n tabs: [\n // append a new tab onto the end of the tabs array, if there is one at the first index\n // if needed, create a new `Content` tab in the first index for this global's base fields\n ...(global?.fields?.[0].type === 'tabs' && global?.fields?.[0].tabs\n ? global.fields[0].tabs\n : [\n {\n fields: [...(global?.fields || [])],\n label: global?.label || 'Content',\n },\n ]),\n {\n fields: seoFields,\n label: 'SEO',\n },\n ],\n },\n ]\n\n return {\n ...global,\n fields: [\n ...seoTabs,\n ...(global?.fields?.[0].type === 'tabs' ? global.fields.slice(1) : []),\n ],\n }\n }\n\n return {\n ...global,\n fields: [...(global?.fields || []), ...seoFields],\n }\n }\n\n return global\n }) || [],\n i18n: {\n ...config.i18n,\n translations: deepMergeSimple(translations, config.i18n?.translations),\n },\n }\n }\n"],"names":["addDataAndFileToRequest","deepMergeSimple","MetaDescriptionField","MetaImageField","MetaTitleField","OverviewField","PreviewField","translations","seoPlugin","pluginConfig","config","seoFields","name","type","fields","hasGenerateFn","generateTitle","overrides","fieldOverrides","title","generateDescription","description","uploadsCollection","generateImage","image","relationTo","generateURL","interfaceName","label","collections","map","collection","slug","isEnabled","includes","tabbedUI","emailField","auth","disableLocalStrategy","find","field","hasOnlyEmailField","length","seoTabs","tabs","filter","labels","singular","slice","endpoints","handler","req","t","result","data","Response","JSON","stringify","status","method","path","globals","global","i18n"],"mappings":"AAEA,SAASA,uBAAuB,QAAQ,6BAA4B;AACpE,SAASC,eAAe,QAAQ,iBAA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;oCACJ,sFAAsF;oCACtF,yFAAyF;uCACrFkB,QAAQhD,QAAQ,CAAC,EAAE,CAACD,SAAS,UAAUiD,QAAQhD,QAAQ,CAAC,EAAE,CAAC8B,OAC3DkB,OAAOhD,MAAM,CAAC,EAAE,CAAC8B,IAAI,GACrB;wCACE;4CACE9B,QAAQ;mDAAKgD,QAAQhD,UAAU,EAAE;6CAAE;4CACnCc,OAAOkC,QAAQlC,SAAS;wCAC1B;qCACD;oCACL;wCACEd,QAAQH;wCACRiB,OAAO;oCACT;iCACD;4BACH;yBACD;wBAED,OAAO;4BACL,GAAGkC,MAAM;4BACThD,QAAQ;mCACH6B;mCACCmB,QAAQhD,QAAQ,CAAC,EAAE,CAACD,SAAS,SAASiD,OAAOhD,MAAM,CAACkC,KAAK,CAAC,KAAK,EAAE;6BACtE;wBACH;oBACF;oBAEA,OAAO;wBACL,GAAGc,MAAM;wBACThD,QAAQ;+BAAKgD,QAAQhD,UAAU,EAAE;+BAAMH;yBAAU;oBACnD;gBACF;gBAEA,OAAOmD;YACT,MAAM,EAAE;YACVC,MAAM;gBACJ,GAAGrD,OAAOqD,IAAI;gBACdxD,cAAcN,gBAAgBM,cAAcG,OAAOqD,IAAI,EAAExD;YAC3D;QACF;IACF,EAAC"}
|
|
1
|
+
{"version":3,"sources":["../src/index.tsx"],"sourcesContent":["import type { Config, Field, GroupField, TabsField } from 'payload'\n\nimport { deepMergeSimple } from 'payload/shared'\n\nimport type {\n GenerateDescription,\n GenerateImage,\n GenerateTitle,\n GenerateURL,\n SEOPluginConfig,\n} from './types.js'\n\nimport { MetaDescriptionField } from './fields/MetaDescription/index.js'\nimport { MetaImageField } from './fields/MetaImage/index.js'\nimport { MetaTitleField } from './fields/MetaTitle/index.js'\nimport { OverviewField } from './fields/Overview/index.js'\nimport { PreviewField } from './fields/Preview/index.js'\nimport { translations } from './translations/index.js'\n\nexport const seoPlugin =\n (pluginConfig: SEOPluginConfig) =>\n (config: Config): Config => {\n const defaultFields: Field[] = [\n OverviewField({}),\n MetaTitleField({\n hasGenerateFn: typeof pluginConfig?.generateTitle === 'function',\n }),\n MetaDescriptionField({\n hasGenerateFn: typeof pluginConfig?.generateDescription === 'function',\n }),\n ...(pluginConfig?.uploadsCollection\n ? [\n MetaImageField({\n hasGenerateFn: typeof pluginConfig?.generateImage === 'function',\n relationTo: pluginConfig.uploadsCollection,\n }),\n ]\n : []),\n PreviewField({\n hasGenerateFn: typeof pluginConfig?.generateURL === 'function',\n }),\n ]\n\n const seoFields: GroupField[] = [\n {\n name: 'meta',\n type: 'group',\n fields: [\n ...(pluginConfig?.fields && typeof pluginConfig.fields === 'function'\n ? pluginConfig.fields({ defaultFields })\n : defaultFields),\n ],\n interfaceName: pluginConfig.interfaceName,\n label: 'SEO',\n },\n ]\n\n return {\n ...config,\n collections:\n config.collections?.map((collection) => {\n const { slug } = collection\n const isEnabled = pluginConfig?.collections?.includes(slug)\n\n if (isEnabled) {\n if (pluginConfig?.tabbedUI) {\n // prevent issues with auth enabled collections having an email field that shouldn't be moved to the SEO tab\n const emailField =\n (collection.auth ||\n !(typeof collection.auth === 'object' && collection.auth.disableLocalStrategy)) &&\n collection.fields?.find((field) => 'name' in field && field.name === 'email')\n const hasOnlyEmailField = collection.fields?.length === 1 && emailField\n\n const seoTabs: TabsField[] = hasOnlyEmailField\n ? [\n {\n type: 'tabs',\n tabs: [\n {\n fields: seoFields,\n label: 'SEO',\n },\n ],\n },\n ]\n : [\n {\n type: 'tabs',\n tabs: [\n // append a new tab onto the end of the tabs array, if there is one at the first index\n // if needed, create a new `Content` tab in the first index for this collection's base fields\n ...(collection?.fields?.[0]?.type === 'tabs' &&\n collection?.fields?.[0]?.tabs\n ? collection.fields[0].tabs\n : [\n {\n fields: [\n ...(emailField\n ? collection.fields.filter(\n (field) => 'name' in field && field.name !== 'email',\n )\n : collection.fields),\n ],\n label: collection?.labels?.singular || 'Content',\n },\n ]),\n {\n fields: seoFields,\n label: 'SEO',\n },\n ],\n },\n ]\n\n return {\n ...collection,\n fields: [\n ...(emailField ? [emailField] : []),\n ...seoTabs,\n ...(collection?.fields?.[0]?.type === 'tabs' ? collection.fields.slice(1) : []),\n ],\n }\n }\n\n return {\n ...collection,\n fields: [...(collection?.fields || []), ...seoFields],\n }\n }\n\n return collection\n }) || [],\n endpoints: [\n ...(config.endpoints ?? []),\n {\n handler: async (req) => {\n const data: Omit<\n Parameters<GenerateTitle>[0],\n 'collectionConfig' | 'globalConfig' | 'req'\n > = await req.json()\n\n if (data) {\n req.data = data\n }\n\n const result = pluginConfig.generateTitle\n ? await pluginConfig.generateTitle({\n ...data,\n collectionConfig: req.data.collectionSlug\n ? config.collections?.find((c) => c.slug === req.data.collectionSlug)\n : null,\n globalConfig: req.data.globalSlug\n ? config.globals?.find((g) => g.slug === req.data.globalSlug)\n : null,\n req,\n } satisfies Parameters<GenerateTitle>[0])\n : ''\n return new Response(JSON.stringify({ result }), { status: 200 })\n },\n method: 'post',\n path: '/plugin-seo/generate-title',\n },\n {\n handler: async (req) => {\n const data: Omit<\n Parameters<GenerateTitle>[0],\n 'collectionConfig' | 'globalConfig' | 'req'\n > = await req.json()\n\n if (data) {\n req.data = data\n }\n\n const result = pluginConfig.generateDescription\n ? await pluginConfig.generateDescription({\n ...data,\n collectionConfig: req.data.collectionSlug\n ? config.collections?.find((c) => c.slug === req.data.collectionSlug)\n : null,\n globalConfig: req.data.globalSlug\n ? config.globals?.find((g) => g.slug === req.data.globalSlug)\n : null,\n req,\n } satisfies Parameters<GenerateDescription>[0])\n : ''\n return new Response(JSON.stringify({ result }), { status: 200 })\n },\n method: 'post',\n path: '/plugin-seo/generate-description',\n },\n {\n handler: async (req) => {\n const data: Omit<\n Parameters<GenerateTitle>[0],\n 'collectionConfig' | 'globalConfig' | 'req'\n > = await req.json()\n\n if (data) {\n req.data = data\n }\n\n const result = pluginConfig.generateURL\n ? await pluginConfig.generateURL({\n ...data,\n collectionConfig: req.data.collectionSlug\n ? config.collections?.find((c) => c.slug === req.data.collectionSlug)\n : null,\n globalConfig: req.data.globalSlug\n ? config.globals?.find((g) => g.slug === req.data.globalSlug)\n : null,\n req,\n } satisfies Parameters<GenerateURL>[0])\n : ''\n return new Response(JSON.stringify({ result }), { status: 200 })\n },\n method: 'post',\n path: '/plugin-seo/generate-url',\n },\n {\n handler: async (req) => {\n const data: Omit<\n Parameters<GenerateTitle>[0],\n 'collectionConfig' | 'globalConfig' | 'req'\n > = await req.json()\n\n if (data) {\n req.data = data\n }\n\n const result = pluginConfig.generateImage\n ? await pluginConfig.generateImage({\n ...data,\n collectionConfig: req.data.collectionSlug\n ? config.collections?.find((c) => c.slug === req.data.collectionSlug)\n : null,\n globalConfig: req.data.globalSlug\n ? config.globals?.find((g) => g.slug === req.data.globalSlug)\n : null,\n req,\n } as Parameters<GenerateImage>[0])\n : ''\n return new Response(result, { status: 200 })\n },\n method: 'post',\n path: '/plugin-seo/generate-image',\n },\n ],\n globals:\n config.globals?.map((global) => {\n const { slug } = global\n const isEnabled = pluginConfig?.globals?.includes(slug)\n\n if (isEnabled) {\n if (pluginConfig?.tabbedUI) {\n const seoTabs: TabsField[] = [\n {\n type: 'tabs',\n tabs: [\n // append a new tab onto the end of the tabs array, if there is one at the first index\n // if needed, create a new `Content` tab in the first index for this global's base fields\n ...(global?.fields?.[0].type === 'tabs' && global?.fields?.[0].tabs\n ? global.fields[0].tabs\n : [\n {\n fields: [...(global?.fields || [])],\n label: global?.label || 'Content',\n },\n ]),\n {\n fields: seoFields,\n label: 'SEO',\n },\n ],\n },\n ]\n\n return {\n ...global,\n fields: [\n ...seoTabs,\n ...(global?.fields?.[0].type === 'tabs' ? global.fields.slice(1) : []),\n ],\n }\n }\n\n return {\n ...global,\n fields: [...(global?.fields || []), ...seoFields],\n }\n }\n\n return global\n }) || [],\n i18n: {\n ...config.i18n,\n translations: deepMergeSimple(translations, config.i18n?.translations),\n },\n }\n }\n"],"names":["deepMergeSimple","MetaDescriptionField","MetaImageField","MetaTitleField","OverviewField","PreviewField","translations","seoPlugin","pluginConfig","config","defaultFields","hasGenerateFn","generateTitle","generateDescription","uploadsCollection","generateImage","relationTo","generateURL","seoFields","name","type","fields","interfaceName","label","collections","map","collection","slug","isEnabled","includes","tabbedUI","emailField","auth","disableLocalStrategy","find","field","hasOnlyEmailField","length","seoTabs","tabs","filter","labels","singular","slice","endpoints","handler","req","data","json","result","collectionConfig","collectionSlug","c","globalConfig","globalSlug","globals","g","Response","JSON","stringify","status","method","path","global","i18n"],"mappings":"AAEA,SAASA,eAAe,QAAQ,iBAAgB;AAUhD,SAASC,oBAAoB,QAAQ,oCAAmC;AACxE,SAASC,cAAc,QAAQ,8BAA6B;AAC5D,SAASC,cAAc,QAAQ,8BAA6B;AAC5D,SAASC,aAAa,QAAQ,6BAA4B;AAC1D,SAASC,YAAY,QAAQ,4BAA2B;AACxD,SAASC,YAAY,QAAQ,0BAAyB;AAEtD,OAAO,MAAMC,YACX,CAACC,eACD,CAACC;QACC,MAAMC,gBAAyB;YAC7BN,cAAc,CAAC;YACfD,eAAe;gBACbQ,eAAe,OAAOH,cAAcI,kBAAkB;YACxD;YACAX,qBAAqB;gBACnBU,eAAe,OAAOH,cAAcK,wBAAwB;YAC9D;eACIL,cAAcM,oBACd;gBACEZ,eAAe;oBACbS,eAAe,OAAOH,cAAcO,kBAAkB;oBACtDC,YAAYR,aAAaM,iBAAiB;gBAC5C;aACD,GACD,EAAE;YACNT,aAAa;gBACXM,eAAe,OAAOH,cAAcS,gBAAgB;YACtD;SACD;QAED,MAAMC,YAA0B;YAC9B;gBACEC,MAAM;gBACNC,MAAM;gBACNC,QAAQ;uBACFb,cAAca,UAAU,OAAOb,aAAaa,MAAM,KAAK,aACvDb,aAAaa,MAAM,CAAC;wBAAEX;oBAAc,KACpCA;iBACL;gBACDY,eAAed,aAAac,aAAa;gBACzCC,OAAO;YACT;SACD;QAED,OAAO;YACL,GAAGd,MAAM;YACTe,aACEf,OAAOe,WAAW,EAAEC,IAAI,CAACC;gBACvB,MAAM,EAAE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IAAI;gBACd1D,cAAcN,gBAAgBM,cAAcG,OAAOuD,IAAI,EAAE1D;YAC3D;QACF;IACF,EAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cs.d.ts","sourceRoot":"","sources":["../../src/translations/cs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AAEzE,eAAO,MAAM,EAAE,EAAE,yBAyBhB,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export const cs = {
|
|
2
|
+
$schema: './translation-schema.json',
|
|
3
|
+
'plugin-seo': {
|
|
4
|
+
almostThere: 'Skoro hotovo',
|
|
5
|
+
autoGenerate: 'Generovat automaticky',
|
|
6
|
+
bestPractices: 'osvědčené postupy',
|
|
7
|
+
characterCount: '{{current}}/{{minLength}}-{{maxLength}} znaků, ',
|
|
8
|
+
charactersLeftOver: '{{characters}} zbývá',
|
|
9
|
+
charactersToGo: '{{characters}} zbývá',
|
|
10
|
+
charactersTooMany: '{{characters}} navíc',
|
|
11
|
+
checksPassing: '{{current}}/{{max}} kontrol úspěšně splněno',
|
|
12
|
+
good: 'Dobré',
|
|
13
|
+
imageAutoGenerationTip: 'Automatická generace načte vybraný hero obrázek.',
|
|
14
|
+
lengthTipDescription: 'Toto by mělo mít mezi {{minLength}} a {{maxLength}} znaky. Pomoc při psaní kvalitních meta popisů navštivte ',
|
|
15
|
+
lengthTipTitle: 'Toto by mělo mít mezi {{minLength}} a {{maxLength}} znaky. Pomoc při psaní kvalitních meta titulů navštivte ',
|
|
16
|
+
missing: 'Chybí',
|
|
17
|
+
noImage: 'Bez obrázku',
|
|
18
|
+
preview: 'Náhled',
|
|
19
|
+
previewDescription: 'Přesný výsledek se může lišit v závislosti na obsahu a relevanci vyhledávání.',
|
|
20
|
+
tooLong: 'Příliš dlouhé',
|
|
21
|
+
tooShort: 'Příliš krátké'
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=cs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/translations/cs.ts"],"sourcesContent":["import type { GenericTranslationsObject } from '@payloadcms/translations'\n\nexport const cs: GenericTranslationsObject = {\n $schema: './translation-schema.json',\n 'plugin-seo': {\n almostThere: 'Skoro hotovo',\n autoGenerate: 'Generovat automaticky',\n bestPractices: 'osvědčené postupy',\n characterCount: '{{current}}/{{minLength}}-{{maxLength}} znaků, ',\n charactersLeftOver: '{{characters}} zbývá',\n charactersToGo: '{{characters}} zbývá',\n charactersTooMany: '{{characters}} navíc',\n checksPassing: '{{current}}/{{max}} kontrol úspěšně splněno',\n good: 'Dobré',\n imageAutoGenerationTip: 'Automatická generace načte vybraný hero obrázek.',\n lengthTipDescription:\n 'Toto by mělo mít mezi {{minLength}} a {{maxLength}} znaky. Pomoc při psaní kvalitních meta popisů navštivte ',\n lengthTipTitle:\n 'Toto by mělo mít mezi {{minLength}} a {{maxLength}} znaky. Pomoc při psaní kvalitních meta titulů navštivte ',\n missing: 'Chybí',\n noImage: 'Bez obrázku',\n preview: 'Náhled',\n previewDescription:\n 'Přesný výsledek se může lišit v závislosti na obsahu a relevanci vyhledávání.',\n tooLong: 'Příliš dlouhé',\n tooShort: 'Příliš krátké',\n },\n}\n"],"names":["cs","$schema","almostThere","autoGenerate","bestPractices","characterCount","charactersLeftOver","charactersToGo","charactersTooMany","checksPassing","good","imageAutoGenerationTip","lengthTipDescription","lengthTipTitle","missing","noImage","preview","previewDescription","tooLong","tooShort"],"mappings":"AAEA,OAAO,MAAMA,KAAgC;IAC3CC,SAAS;IACT,cAAc;QACZC,aAAa;QACbC,cAAc;QACdC,eAAe;QACfC,gBAAgB;QAChBC,oBAAoB;QACpBC,gBAAgB;QAChBC,mBAAmB;QACnBC,eAAe;QACfC,MAAM;QACNC,wBAAwB;QACxBC,sBACE;QACFC,gBACE;QACFC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,oBACE;QACFC,SAAS;QACTC,UAAU;IACZ;AACF,EAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"de.d.ts","sourceRoot":"","sources":["../../src/translations/de.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AAEzE,eAAO,MAAM,EAAE,EAAE,yBAyBhB,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export const de = {
|
|
2
|
+
$schema: './translation-schema.json',
|
|
3
|
+
'plugin-seo': {
|
|
4
|
+
almostThere: 'Fast da',
|
|
5
|
+
autoGenerate: 'Automatisch generieren',
|
|
6
|
+
bestPractices: 'Best Practices',
|
|
7
|
+
characterCount: '{{current}}/{{minLength}}-{{maxLength}} Zeichen, ',
|
|
8
|
+
charactersLeftOver: '{{characters}} verbleiben',
|
|
9
|
+
charactersToGo: '{{characters}} übrig',
|
|
10
|
+
charactersTooMany: '{{characters}} zu viel',
|
|
11
|
+
checksPassing: '{{current}}/{{max}} Kontrollen erfolgreich',
|
|
12
|
+
good: 'Gut',
|
|
13
|
+
imageAutoGenerationTip: 'Die automatische Generierung ruft das ausgewählte Hauptbild ab.',
|
|
14
|
+
lengthTipDescription: 'Diese sollte zwischen {{minLength}} und {{maxLength}} Zeichen lang sein. Für Hilfe beim Schreiben von qualitativ hochwertigen Meta-Beschreibungen siehe ',
|
|
15
|
+
lengthTipTitle: 'Dieser sollte zwischen {{minLength}} und {{maxLength}} Zeichen lang sein. Für Hilfe beim Schreiben von qualitativ hochwertigen Meta-Titeln siehe ',
|
|
16
|
+
missing: 'Fehlt',
|
|
17
|
+
noImage: 'Kein Bild',
|
|
18
|
+
preview: 'Vorschau',
|
|
19
|
+
previewDescription: 'Die genauen Ergebnislisten können je nach Inhalt und Suchrelevanz variieren.',
|
|
20
|
+
tooLong: 'Zu lang',
|
|
21
|
+
tooShort: 'Zu kurz'
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=de.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/translations/de.ts"],"sourcesContent":["import type { GenericTranslationsObject } from '@payloadcms/translations'\n\nexport const de: GenericTranslationsObject = {\n $schema: './translation-schema.json',\n 'plugin-seo': {\n almostThere: 'Fast da',\n autoGenerate: 'Automatisch generieren',\n bestPractices: 'Best Practices',\n characterCount: '{{current}}/{{minLength}}-{{maxLength}} Zeichen, ',\n charactersLeftOver: '{{characters}} verbleiben',\n charactersToGo: '{{characters}} übrig',\n charactersTooMany: '{{characters}} zu viel',\n checksPassing: '{{current}}/{{max}} Kontrollen erfolgreich',\n good: 'Gut',\n imageAutoGenerationTip: 'Die automatische Generierung ruft das ausgewählte Hauptbild ab.',\n lengthTipDescription:\n 'Diese sollte zwischen {{minLength}} und {{maxLength}} Zeichen lang sein. Für Hilfe beim Schreiben von qualitativ hochwertigen Meta-Beschreibungen siehe ',\n lengthTipTitle:\n 'Dieser sollte zwischen {{minLength}} und {{maxLength}} Zeichen lang sein. Für Hilfe beim Schreiben von qualitativ hochwertigen Meta-Titeln siehe ',\n missing: 'Fehlt',\n noImage: 'Kein Bild',\n preview: 'Vorschau',\n previewDescription:\n 'Die genauen Ergebnislisten können je nach Inhalt und Suchrelevanz variieren.',\n tooLong: 'Zu lang',\n tooShort: 'Zu kurz',\n },\n}\n"],"names":["de","$schema","almostThere","autoGenerate","bestPractices","characterCount","charactersLeftOver","charactersToGo","charactersTooMany","checksPassing","good","imageAutoGenerationTip","lengthTipDescription","lengthTipTitle","missing","noImage","preview","previewDescription","tooLong","tooShort"],"mappings":"AAEA,OAAO,MAAMA,KAAgC;IAC3CC,SAAS;IACT,cAAc;QACZC,aAAa;QACbC,cAAc;QACdC,eAAe;QACfC,gBAAgB;QAChBC,oBAAoB;QACpBC,gBAAgB;QAChBC,mBAAmB;QACnBC,eAAe;QACfC,MAAM;QACNC,wBAAwB;QACxBC,sBACE;QACFC,gBACE;QACFC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,oBACE;QACFC,SAAS;QACTC,UAAU;IACZ;AACF,EAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/translations/en.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AAEzE,eAAO,MAAM,EAAE,EAAE,yBAwBhB,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export const en = {
|
|
2
|
+
$schema: './translation-schema.json',
|
|
3
|
+
'plugin-seo': {
|
|
4
|
+
almostThere: 'Almost there',
|
|
5
|
+
autoGenerate: 'Auto-generate',
|
|
6
|
+
bestPractices: 'best practices',
|
|
7
|
+
characterCount: '{{current}}/{{minLength}}-{{maxLength}} chars, ',
|
|
8
|
+
charactersLeftOver: '{{characters}} left over',
|
|
9
|
+
charactersToGo: '{{characters}} to go',
|
|
10
|
+
charactersTooMany: '{{characters}} too many',
|
|
11
|
+
checksPassing: '{{current}}/{{max}} checks are passing',
|
|
12
|
+
good: 'Good',
|
|
13
|
+
imageAutoGenerationTip: 'Auto-generation will retrieve the selected hero image.',
|
|
14
|
+
lengthTipDescription: 'This should be between {{minLength}} and {{maxLength}} characters. For help in writing quality meta descriptions, see ',
|
|
15
|
+
lengthTipTitle: 'This should be between {{minLength}} and {{maxLength}} characters. For help in writing quality meta titles, see ',
|
|
16
|
+
missing: 'Missing',
|
|
17
|
+
noImage: 'No image',
|
|
18
|
+
preview: 'Preview',
|
|
19
|
+
previewDescription: 'Exact result listings may vary based on content and search relevancy.',
|
|
20
|
+
tooLong: 'Too long',
|
|
21
|
+
tooShort: 'Too short'
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=en.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/translations/en.ts"],"sourcesContent":["import type { GenericTranslationsObject } from '@payloadcms/translations'\n\nexport const en: GenericTranslationsObject = {\n $schema: './translation-schema.json',\n 'plugin-seo': {\n almostThere: 'Almost there',\n autoGenerate: 'Auto-generate',\n bestPractices: 'best practices',\n characterCount: '{{current}}/{{minLength}}-{{maxLength}} chars, ',\n charactersLeftOver: '{{characters}} left over',\n charactersToGo: '{{characters}} to go',\n charactersTooMany: '{{characters}} too many',\n checksPassing: '{{current}}/{{max}} checks are passing',\n good: 'Good',\n imageAutoGenerationTip: 'Auto-generation will retrieve the selected hero image.',\n lengthTipDescription:\n 'This should be between {{minLength}} and {{maxLength}} characters. For help in writing quality meta descriptions, see ',\n lengthTipTitle:\n 'This should be between {{minLength}} and {{maxLength}} characters. For help in writing quality meta titles, see ',\n missing: 'Missing',\n noImage: 'No image',\n preview: 'Preview',\n previewDescription: 'Exact result listings may vary based on content and search relevancy.',\n tooLong: 'Too long',\n tooShort: 'Too short',\n },\n}\n"],"names":["en","$schema","almostThere","autoGenerate","bestPractices","characterCount","charactersLeftOver","charactersToGo","charactersTooMany","checksPassing","good","imageAutoGenerationTip","lengthTipDescription","lengthTipTitle","missing","noImage","preview","previewDescription","tooLong","tooShort"],"mappings":"AAEA,OAAO,MAAMA,KAAgC;IAC3CC,SAAS;IACT,cAAc;QACZC,aAAa;QACbC,cAAc;QACdC,eAAe;QACfC,gBAAgB;QAChBC,oBAAoB;QACpBC,gBAAgB;QAChBC,mBAAmB;QACnBC,eAAe;QACfC,MAAM;QACNC,wBAAwB;QACxBC,sBACE;QACFC,gBACE;QACFC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,oBAAoB;QACpBC,SAAS;QACTC,UAAU;IACZ;AACF,EAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"es.d.ts","sourceRoot":"","sources":["../../src/translations/es.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AAEzE,eAAO,MAAM,EAAE,EAAE,yBAyBhB,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export const es = {
|
|
2
|
+
$schema: './translation-schema.json',
|
|
3
|
+
'plugin-seo': {
|
|
4
|
+
almostThere: 'Ya casi está',
|
|
5
|
+
autoGenerate: 'Autogénerar',
|
|
6
|
+
bestPractices: 'mejores prácticas',
|
|
7
|
+
characterCount: '{{current}}/{{minLength}}-{{maxLength}} letras, ',
|
|
8
|
+
charactersLeftOver: '{{characters}} letras sobrantes',
|
|
9
|
+
charactersToGo: '{{characters}} letras sobrantes',
|
|
10
|
+
charactersTooMany: '{{characters}} letras demasiados',
|
|
11
|
+
checksPassing: '{{current}}/{{max}} las comprobaciones están pasando',
|
|
12
|
+
good: 'Bien',
|
|
13
|
+
imageAutoGenerationTip: 'La autogeneración recuperará la imagen de héroe seleccionada.',
|
|
14
|
+
lengthTipDescription: 'Esto debe estar entre {{minLength}} y {{maxLength}} caracteres. Para obtener ayuda sobre cómo escribir meta descripciones de calidad, consulte ',
|
|
15
|
+
lengthTipTitle: 'Debe tener entre {{minLength}} y {{maxLength}} caracteres. Para obtener ayuda sobre cómo escribir metatítulos de calidad, consulte ',
|
|
16
|
+
missing: 'Falta',
|
|
17
|
+
noImage: 'Sin imagen',
|
|
18
|
+
preview: 'Vista previa',
|
|
19
|
+
previewDescription: 'Las listas de resultados pueden variar segun la relevancia de buesqueda y el contenido.',
|
|
20
|
+
tooLong: 'Demasiado largo',
|
|
21
|
+
tooShort: 'Demasiado corto'
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=es.js.map
|