@payloadcms/plugin-seo
Advanced tools
Comparing version 3.0.0-alpha.48 to 3.0.0-alpha.49
@@ -1,2 +0,2 @@ | ||
import type { FormFieldBase } from '@payloadcms/ui'; | ||
import type { FormFieldBase } from '@payloadcms/ui/fields/shared'; | ||
import React from 'react'; | ||
@@ -3,0 +3,0 @@ type MetaDescriptionProps = FormFieldBase & { |
'use client'; | ||
import { useFieldPath } from '@payloadcms/ui'; | ||
import { useTranslation } from '@payloadcms/ui'; | ||
import { TextareaInput } from '@payloadcms/ui'; | ||
import { useAllFormFields, useDocumentInfo, useField, useLocale } from '@payloadcms/ui'; | ||
import { TextareaInput } from '@payloadcms/ui/fields/Textarea'; | ||
import { FieldLabel } from '@payloadcms/ui/forms/FieldLabel'; | ||
import { useFieldProps } from '@payloadcms/ui/forms/FieldPropsProvider'; | ||
import { useAllFormFields } from '@payloadcms/ui/forms/Form'; | ||
import { useField } from '@payloadcms/ui/forms/useField'; | ||
import { useDocumentInfo } from '@payloadcms/ui/providers/DocumentInfo'; | ||
import { useLocale } from '@payloadcms/ui/providers/Locale'; | ||
import { useTranslation } from '@payloadcms/ui/providers/Translation'; | ||
import React, { useCallback } from 'react'; | ||
@@ -11,4 +15,4 @@ import { defaults } from '../defaults.js'; | ||
export const MetaDescription = (props)=>{ | ||
const { Label, hasGenerateDescriptionFn, path, required } = props; | ||
const { path: pathFromContext, schemaPath } = useFieldPath(); | ||
const { CustomLabel, hasGenerateDescriptionFn, labelProps, path, required } = props; | ||
const { path: pathFromContext } = useFieldProps(); | ||
const { t } = useTranslation(); | ||
@@ -58,3 +62,3 @@ const locale = useLocale(); | ||
className: "plugin-seo__field" | ||
}, Label, required && /*#__PURE__*/ React.createElement("span", { | ||
}, CustomLabel !== undefined ? CustomLabel : /*#__PURE__*/ React.createElement(FieldLabel, labelProps || {}), required && /*#__PURE__*/ React.createElement("span", { | ||
style: { | ||
@@ -93,3 +97,3 @@ color: 'var(--theme-error-500)', | ||
}, /*#__PURE__*/ React.createElement(TextareaInput, { | ||
Error: errorMessage, | ||
CustomError: errorMessage, | ||
onChange: setValue, | ||
@@ -96,0 +100,0 @@ path: pathFromContext, |
@@ -1,2 +0,2 @@ | ||
import type { UploadInputProps } from '@payloadcms/ui'; | ||
import type { UploadInputProps } from '@payloadcms/ui/fields/Upload'; | ||
import React from 'react'; | ||
@@ -3,0 +3,0 @@ type MetaImageProps = UploadInputProps & { |
'use client'; | ||
import { UploadInput, useAllFormFields, useConfig, useDocumentInfo, useField, useLocale, useTranslation } from '@payloadcms/ui'; | ||
import { UploadInput } from '@payloadcms/ui/fields/Upload'; | ||
import { FieldLabel } from '@payloadcms/ui/forms/FieldLabel'; | ||
import { useAllFormFields } from '@payloadcms/ui/forms/Form'; | ||
import { useField } from '@payloadcms/ui/forms/useField'; | ||
import { useConfig } from '@payloadcms/ui/providers/Config'; | ||
import { useDocumentInfo } from '@payloadcms/ui/providers/DocumentInfo'; | ||
import { useLocale } from '@payloadcms/ui/providers/Locale'; | ||
import { useTranslation } from '@payloadcms/ui/providers/Translation'; | ||
import React, { useCallback } from 'react'; | ||
import { Pill } from '../ui/Pill.js'; | ||
export const MetaImage = (props)=>{ | ||
const { Label, hasGenerateImageFn, path, relationTo, required } = props || {}; | ||
const { CustomLabel, hasGenerateImageFn, labelProps, relationTo, required } = props || {}; | ||
const field = useField(props); | ||
@@ -53,3 +60,3 @@ const { t } = useTranslation(); | ||
className: "plugin-seo__field" | ||
}, Label, required && /*#__PURE__*/ React.createElement("span", { | ||
}, CustomLabel !== undefined ? CustomLabel : /*#__PURE__*/ React.createElement(FieldLabel, labelProps || {}), required && /*#__PURE__*/ React.createElement("span", { | ||
style: { | ||
@@ -81,3 +88,3 @@ color: 'var(--theme-error-500)', | ||
}, /*#__PURE__*/ React.createElement(UploadInput, { | ||
Error: errorMessage, | ||
CustomError: errorMessage, | ||
api: api, | ||
@@ -84,0 +91,0 @@ collection: collection, |
@@ -1,2 +0,2 @@ | ||
import type { FormFieldBase } from '@payloadcms/ui'; | ||
import type { FormFieldBase } from '@payloadcms/ui/fields/shared'; | ||
import React from 'react'; | ||
@@ -3,0 +3,0 @@ import './index.scss'; |
'use client'; | ||
import { useFieldPath } from '@payloadcms/ui'; | ||
import { TextInput, useAllFormFields, useDocumentInfo, useField, useLocale, useTranslation } from '@payloadcms/ui'; | ||
import { TextInput } from '@payloadcms/ui/fields/Text'; | ||
import { FieldLabel } from '@payloadcms/ui/forms/FieldLabel'; | ||
import { useFieldProps } from '@payloadcms/ui/forms/FieldPropsProvider'; | ||
import { useAllFormFields } from '@payloadcms/ui/forms/Form'; | ||
import { useField } from '@payloadcms/ui/forms/useField'; | ||
import { useDocumentInfo } from '@payloadcms/ui/providers/DocumentInfo'; | ||
import { useLocale } from '@payloadcms/ui/providers/Locale'; | ||
import { useTranslation } from '@payloadcms/ui/providers/Translation'; | ||
import React, { useCallback } from 'react'; | ||
@@ -10,4 +16,4 @@ import { defaults } from '../defaults.js'; | ||
export const MetaTitle = (props)=>{ | ||
const { Label, hasGenerateTitleFn, path, required } = props || {}; | ||
const { path: pathFromContext, schemaPath } = useFieldPath(); | ||
const { CustomLabel, hasGenerateTitleFn, labelProps, path, required } = props || {}; | ||
const { path: pathFromContext } = useFieldProps(); | ||
const { t } = useTranslation(); | ||
@@ -57,3 +63,3 @@ const field = useField({ | ||
className: "plugin-seo__field" | ||
}, Label, required && /*#__PURE__*/ React.createElement("span", { | ||
}, CustomLabel !== undefined ? CustomLabel : /*#__PURE__*/ React.createElement(FieldLabel, labelProps || {}), required && /*#__PURE__*/ React.createElement("span", { | ||
style: { | ||
@@ -92,3 +98,3 @@ color: 'var(--theme-error-500)', | ||
}, /*#__PURE__*/ React.createElement(TextInput, { | ||
Error: errorMessage, | ||
CustomError: errorMessage, | ||
onChange: setValue, | ||
@@ -95,0 +101,0 @@ path: pathFromContext, |
import type { Config } from 'payload/config'; | ||
import type { PluginConfig } from './types.js'; | ||
declare const seo: (pluginConfig: PluginConfig) => (config: Config) => Config; | ||
export default seo; | ||
export { seo }; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -6,3 +6,3 @@ import { deepMerge } from 'payload/utilities'; | ||
import { MetaTitle } from './fields/MetaTitle.js'; | ||
import translations from './translations/index.js'; | ||
import { translations } from './translations/index.js'; | ||
import { Overview } from './ui/Overview.js'; | ||
@@ -108,3 +108,3 @@ import { Preview } from './ui/Preview.js'; | ||
// if needed, create a new `Content` tab in the first index for this collection's base fields | ||
...collection?.fields?.[0]?.type === 'tabs' ? collection.fields[0]?.tabs : [ | ||
...collection?.fields?.[0]?.type === 'tabs' && collection?.fields?.[0]?.tabs ? collection.fields[0].tabs : [ | ||
{ | ||
@@ -208,3 +208,3 @@ fields: [ | ||
// if needed, create a new `Content` tab in the first index for this global's base fields | ||
...global?.fields?.[0].type === 'tabs' ? global.fields[0]?.tabs : [ | ||
...global?.fields?.[0].type === 'tabs' && global?.fields?.[0].tabs ? global.fields[0].tabs : [ | ||
{ | ||
@@ -228,3 +228,3 @@ fields: [ | ||
...seoTabs, | ||
...global?.fields?.[0].type === 'tabs' ? global?.fields?.slice(1) : [] | ||
...global?.fields?.[0].type === 'tabs' ? global.fields.slice(1) : [] | ||
] | ||
@@ -251,4 +251,4 @@ }; | ||
}; | ||
export default seo; | ||
export { seo }; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
declare const _default: { | ||
export declare const translations: { | ||
en: { | ||
@@ -113,3 +113,2 @@ $schema: string; | ||
}; | ||
export default _default; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -6,3 +6,3 @@ import en from './en.json'; | ||
import pl from './pl.json'; | ||
export default { | ||
export const translations = { | ||
en, | ||
@@ -9,0 +9,0 @@ es, |
@@ -1,2 +0,2 @@ | ||
import type { DocumentInfoContext } from '@payloadcms/ui/providers'; | ||
import type { DocumentInfoContext } from '@payloadcms/ui/providers/DocumentInfo'; | ||
import type { Field, TextField, TextareaField, UploadField } from 'payload/types'; | ||
@@ -3,0 +3,0 @@ export type GenerateTitle = <T = any>(args: DocumentInfoContext & { |
'use client'; | ||
import { useTranslation } from '@payloadcms/ui'; | ||
import { useTranslation } from '@payloadcms/ui/providers/Translation'; | ||
import React, { Fragment, useEffect, useState } from 'react'; | ||
@@ -62,3 +62,4 @@ import { Pill } from './Pill.js'; | ||
maxLength, | ||
text | ||
text, | ||
t | ||
]); | ||
@@ -65,0 +66,0 @@ const textLength = text?.length || 0; |
'use client'; | ||
import { useAllFormFields, useForm, useTranslation } from '@payloadcms/ui'; | ||
import { useAllFormFields, useForm } from '@payloadcms/ui/forms/Form'; | ||
import { useTranslation } from '@payloadcms/ui/providers/Translation'; | ||
import React, { useCallback, useEffect, useState } from 'react'; | ||
@@ -4,0 +5,0 @@ import { defaults } from '../defaults.js'; |
'use client'; | ||
import { useAllFormFields, useDocumentInfo, useLocale, useTranslation } from '@payloadcms/ui'; | ||
import { useAllFormFields } from '@payloadcms/ui/forms/Form'; | ||
import { useDocumentInfo } from '@payloadcms/ui/providers/DocumentInfo'; | ||
import { useLocale } from '@payloadcms/ui/providers/Locale'; | ||
import { useTranslation } from '@payloadcms/ui/providers/Translation'; | ||
import React, { useEffect, useState } from 'react'; | ||
@@ -4,0 +7,0 @@ export const Preview = ({ hasGenerateURLFn })=>{ |
{ | ||
"name": "@payloadcms/plugin-seo", | ||
"version": "3.0.0-alpha.48", | ||
"version": "3.0.0-alpha.49", | ||
"homepage:": "https://payloadcms.com", | ||
@@ -23,5 +23,5 @@ "repository": "git@github.com:payloadcms/plugin-seo.git", | ||
"react": "^18.0.0", | ||
"payload": "3.0.0-alpha.48", | ||
"@payloadcms/ui": "3.0.0-alpha.48", | ||
"@payloadcms/translations": "3.0.0-alpha.48" | ||
"payload": "3.0.0-alpha.49", | ||
"@payloadcms/translations": "3.0.0-alpha.49", | ||
"@payloadcms/ui": "3.0.0-alpha.49" | ||
}, | ||
@@ -32,5 +32,5 @@ "devDependencies": { | ||
"@payloadcms/eslint-config": "1.1.1", | ||
"payload": "3.0.0-alpha.48", | ||
"@payloadcms/ui": "3.0.0-alpha.48", | ||
"@payloadcms/translations": "3.0.0-alpha.48" | ||
"payload": "3.0.0-alpha.49", | ||
"@payloadcms/translations": "3.0.0-alpha.49", | ||
"@payloadcms/ui": "3.0.0-alpha.49" | ||
}, | ||
@@ -37,0 +37,0 @@ "exports": null, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
122585
56
1549