chore: playwright support (#5262)
* working playwright * chore: use zipped, local build of playwright instead of patching it * chore: remove bloat * chore: get playwright and lexical to work by fixing imports from cjs modules
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import type { FormState } from 'payload/types'
|
||||
|
||||
import { useModal } from '@faceless-ui/modal'
|
||||
import * as facelessUIImport from '@faceless-ui/modal'
|
||||
import {
|
||||
getFormState,
|
||||
reduceFieldsToValues,
|
||||
@@ -63,6 +63,8 @@ const insertLink = (editor, fields) => {
|
||||
}
|
||||
|
||||
export const LinkButton: React.FC = () => {
|
||||
const { useModal } = facelessUIImport
|
||||
|
||||
const { fieldProps } = useElementButton()
|
||||
const [initialState, setInitialState] = useState<FormState>({})
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import type { FormState } from 'payload/types'
|
||||
|
||||
import { useModal } from '@faceless-ui/modal'
|
||||
import * as facelessUIImport from '@faceless-ui/modal'
|
||||
import { getTranslation } from '@payloadcms/translations'
|
||||
import {
|
||||
Button,
|
||||
@@ -60,6 +60,7 @@ const insertChange = (editor, fields) => {
|
||||
export const LinkElement = () => {
|
||||
const { attributes, children, editorRef, element, fieldProps, schemaPath } =
|
||||
useElement<LinkElementType>()
|
||||
const { useModal } = facelessUIImport
|
||||
|
||||
const fieldMapPath = `${schemaPath}.${linkFieldsSchemaPath}`
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import type { FormFieldBase } from '@payloadcms/ui/types'
|
||||
import type { SanitizedCollectionConfig } from 'payload/types'
|
||||
|
||||
import { useModal } from '@faceless-ui/modal'
|
||||
import * as facelessUIImport from '@faceless-ui/modal'
|
||||
import { getTranslation } from '@payloadcms/translations'
|
||||
import {
|
||||
Drawer,
|
||||
@@ -37,6 +37,8 @@ export const UploadDrawer: React.FC<{
|
||||
relatedCollection: SanitizedCollectionConfig
|
||||
schemaPath: string
|
||||
}> = (props) => {
|
||||
const { useModal } = facelessUIImport
|
||||
|
||||
const editor = useSlateStatic()
|
||||
|
||||
const { drawerSlug, element, fieldProps, relatedCollection, schemaPath } = props
|
||||
|
||||
Reference in New Issue
Block a user