@payloadcms/ui 3.0.1 → 3.0.2-canary.03cffa2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"DrawerContent.d.ts","sourceRoot":"","sources":["../../../src/elements/DocumentDrawer/DrawerContent.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA2C,MAAM,OAAO,CAAA;AAG/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AASrD,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA4J/D,CAAA"}
1
+ {"version":3,"file":"DrawerContent.d.ts","sourceRoot":"","sources":["../../../src/elements/DocumentDrawer/DrawerContent.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAmD,MAAM,OAAO,CAAA;AAGvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AASrD,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA8J/D,CAAA"}
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { jsx as _jsx } from "react/jsx-runtime";
4
4
  import { useModal } from '@faceless-ui/modal';
5
- import React, { useCallback, useEffect, useState } from 'react';
5
+ import React, { useCallback, useEffect, useRef, useState } from 'react';
6
6
  import { toast } from 'sonner';
7
7
  import { LoadingOverlay } from '../../elements/Loading/index.js';
8
8
  import { useConfig } from '../../providers/Config/index.js';
@@ -43,6 +43,7 @@ export const DocumentDrawerContent = ({
43
43
  } = useServerFunctions();
44
44
  const [DocumentView, setDocumentView] = useState(undefined);
45
45
  const [isLoading, setIsLoading] = useState(true);
46
+ const hasRenderedDocument = useRef(false);
46
47
  const getDocumentView = useCallback(docID => {
47
48
  abortAndIgnore(documentViewAbortControllerRef.current);
48
49
  const controller = new AbortController();
@@ -103,8 +104,9 @@ export const DocumentDrawerContent = ({
103
104
  getDocumentView();
104
105
  }, [getDocumentView]);
105
106
  useEffect(() => {
106
- if (!DocumentView) {
107
+ if (!DocumentView && !hasRenderedDocument.current) {
107
108
  getDocumentView(existingDocID);
109
+ hasRenderedDocument.current = true;
108
110
  }
109
111
  }, [DocumentView, getDocumentView, existingDocID]);
110
112
  // Cleanup any pending requests when the component unmounts
@@ -1 +1 @@
1
- {"version":3,"file":"DrawerContent.js","names":["useModal","React","useCallback","useEffect","useState","toast","LoadingOverlay","useConfig","useServerFunctions","useTranslation","abortAndIgnore","DocumentDrawerContextProvider","DocumentDrawerContent","id","existingDocID","AfterFields","collectionSlug","disableActions","drawerSlug","Header","initialData","initialState","onDelete","onDeleteFromProps","onDuplicate","onDuplicateFromProps","onSave","onSaveFromProps","redirectAfterDelete","redirectAfterDuplicate","config","collections","collectionConfig","find","collection","slug","documentViewAbortControllerRef","useRef","closeModal","t","renderDocument","DocumentView","setDocumentView","undefined","isLoading","setIsLoading","getDocumentView","docID","current","controller","AbortController","fetchDocumentView","result","signal","Document","error","message","args","doc","clearDoc","_jsx"],"sources":["../../../src/elements/DocumentDrawer/DrawerContent.tsx"],"sourcesContent":["'use client'\n\nimport { useModal } from '@faceless-ui/modal'\nimport React, { useCallback, useEffect, useState } from 'react'\nimport { toast } from 'sonner'\n\nimport type { DocumentDrawerProps } from './types.js'\n\nimport { LoadingOverlay } from '../../elements/Loading/index.js'\nimport { useConfig } from '../../providers/Config/index.js'\nimport { useServerFunctions } from '../../providers/ServerFunctions/index.js'\nimport { useTranslation } from '../../providers/Translation/index.js'\nimport { abortAndIgnore } from '../../utilities/abortAndIgnore.js'\nimport { DocumentDrawerContextProvider } from './Provider.js'\n\nexport const DocumentDrawerContent: React.FC<DocumentDrawerProps> = ({\n id: existingDocID,\n AfterFields,\n collectionSlug,\n disableActions,\n drawerSlug,\n Header,\n initialData,\n initialState,\n onDelete: onDeleteFromProps,\n onDuplicate: onDuplicateFromProps,\n onSave: onSaveFromProps,\n redirectAfterDelete,\n redirectAfterDuplicate,\n}) => {\n const {\n config: { collections },\n } = useConfig()\n\n const [collectionConfig] = useState(() =>\n collections.find((collection) => collection.slug === collectionSlug),\n )\n\n const documentViewAbortControllerRef = React.useRef<AbortController>(null)\n\n const { closeModal } = useModal()\n const { t } = useTranslation()\n\n const { renderDocument } = useServerFunctions()\n\n const [DocumentView, setDocumentView] = useState<React.ReactNode>(undefined)\n const [isLoading, setIsLoading] = useState(true)\n\n const getDocumentView = useCallback(\n (docID?: number | string) => {\n abortAndIgnore(documentViewAbortControllerRef.current)\n\n const controller = new AbortController()\n documentViewAbortControllerRef.current = controller\n\n const fetchDocumentView = async () => {\n setIsLoading(true)\n\n try {\n const result = await renderDocument({\n collectionSlug,\n disableActions,\n docID,\n drawerSlug,\n initialData,\n redirectAfterDelete: redirectAfterDelete !== undefined ? redirectAfterDelete : false,\n redirectAfterDuplicate:\n redirectAfterDuplicate !== undefined ? redirectAfterDuplicate : false,\n signal: controller.signal,\n })\n\n if (result?.Document) {\n setDocumentView(result.Document)\n setIsLoading(false)\n }\n } catch (error) {\n toast.error(error?.message || t('error:unspecific'))\n closeModal(drawerSlug)\n // toast.error(data?.errors?.[0].message || t('error:unspecific'))\n }\n }\n\n void fetchDocumentView()\n },\n [\n collectionSlug,\n disableActions,\n drawerSlug,\n initialData,\n redirectAfterDelete,\n redirectAfterDuplicate,\n renderDocument,\n closeModal,\n t,\n ],\n )\n\n const onSave = useCallback<DocumentDrawerProps['onSave']>(\n (args) => {\n getDocumentView(args.doc.id)\n\n if (typeof onSaveFromProps === 'function') {\n void onSaveFromProps({\n ...args,\n collectionConfig,\n })\n }\n },\n [onSaveFromProps, collectionConfig, getDocumentView],\n )\n\n const onDuplicate = useCallback<DocumentDrawerProps['onDuplicate']>(\n (args) => {\n getDocumentView(args.doc.id)\n\n if (typeof onDuplicateFromProps === 'function') {\n void onDuplicateFromProps({\n ...args,\n collectionConfig,\n })\n }\n },\n [onDuplicateFromProps, collectionConfig, getDocumentView],\n )\n\n const onDelete = useCallback<DocumentDrawerProps['onDelete']>(\n (args) => {\n if (typeof onDeleteFromProps === 'function') {\n void onDeleteFromProps({\n ...args,\n collectionConfig,\n })\n }\n\n closeModal(drawerSlug)\n },\n [onDeleteFromProps, closeModal, drawerSlug, collectionConfig],\n )\n\n const clearDoc = useCallback(() => {\n getDocumentView()\n }, [getDocumentView])\n\n useEffect(() => {\n if (!DocumentView) {\n getDocumentView(existingDocID)\n }\n }, [DocumentView, getDocumentView, existingDocID])\n\n // Cleanup any pending requests when the component unmounts\n useEffect(() => {\n return () => {\n abortAndIgnore(documentViewAbortControllerRef.current)\n }\n }, [])\n\n if (isLoading) {\n return <LoadingOverlay />\n }\n\n return (\n <DocumentDrawerContextProvider\n clearDoc={clearDoc}\n drawerSlug={drawerSlug}\n onDelete={onDelete}\n onDuplicate={onDuplicate}\n onSave={onSave}\n >\n {DocumentView}\n </DocumentDrawerContextProvider>\n )\n}\n"],"mappings":"AAAA;;;AAEA,SAASA,QAAQ,QAAQ;AACzB,OAAOC,KAAA,IAASC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ;AACxD,SAASC,KAAK,QAAQ;AAItB,SAASC,cAAc,QAAQ;AAC/B,SAASC,SAAS,QAAQ;AAC1B,SAASC,kBAAkB,QAAQ;AACnC,SAASC,cAAc,QAAQ;AAC/B,SAASC,cAAc,QAAQ;AAC/B,SAASC,6BAA6B,QAAQ;AAE9C,OAAO,MAAMC,qBAAA,GAAuDA,CAAC;EACnEC,EAAA,EAAIC,aAAa;EACjBC,WAAW;EACXC,cAAc;EACdC,cAAc;EACdC,UAAU;EACVC,MAAM;EACNC,WAAW;EACXC,YAAY;EACZC,QAAA,EAAUC,iBAAiB;EAC3BC,WAAA,EAAaC,oBAAoB;EACjCC,MAAA,EAAQC,eAAe;EACvBC,mBAAmB;EACnBC;AAAsB,CACvB;EACC,MAAM;IACJC,MAAA,EAAQ;MAAEC;IAAW;EAAE,CACxB,GAAGxB,SAAA;EAEJ,MAAM,CAACyB,gBAAA,CAAiB,GA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BY,OAAO;IACvD;EACF,GAAG,EAAE;EAEL,IAAIJ,SAAA,EAAW;IACb,oBAAOgB,IAAA,CAACtD,cAAA;EACV;EAEA,oBACEsD,IAAA,CAACjD,6BAAA;IACCgD,QAAA,EAAUA,QAAA;IACVzC,UAAA,EAAYA,UAAA;IACZI,QAAA,EAAUA,QAAA;IACVE,WAAA,EAAaA,WAAA;IACbE,MAAA,EAAQA,MAAA;cAEPe;;AAGP","ignoreList":[]}
1
+ {"version":3,"file":"DrawerContent.js","names":["useModal","React","useCallback","useEffect","useRef","useState","toast","LoadingOverlay","useConfig","useServerFunctions","useTranslation","abortAndIgnore","DocumentDrawerContextProvider","DocumentDrawerContent","id","existingDocID","AfterFields","collectionSlug","disableActions","drawerSlug","Header","initialData","initialState","onDelete","onDeleteFromProps","onDuplicate","onDuplicateFromProps","onSave","onSaveFromProps","redirectAfterDelete","redirectAfterDuplicate","config","collections","collectionConfig","find","collection","slug","documentViewAbortControllerRef","closeModal","t","renderDocument","DocumentView","setDocumentView","undefined","isLoading","setIsLoading","hasRenderedDocument","getDocumentView","docID","current","controller","AbortController","fetchDocumentView","result","signal","Document","error","message","args","doc","clearDoc","_jsx"],"sources":["../../../src/elements/DocumentDrawer/DrawerContent.tsx"],"sourcesContent":["'use client'\n\nimport { useModal } from '@faceless-ui/modal'\nimport React, { useCallback, useEffect, useRef, useState } from 'react'\nimport { toast } from 'sonner'\n\nimport type { DocumentDrawerProps } from './types.js'\n\nimport { LoadingOverlay } from '../../elements/Loading/index.js'\nimport { useConfig } from '../../providers/Config/index.js'\nimport { useServerFunctions } from '../../providers/ServerFunctions/index.js'\nimport { useTranslation } from '../../providers/Translation/index.js'\nimport { abortAndIgnore } from '../../utilities/abortAndIgnore.js'\nimport { DocumentDrawerContextProvider } from './Provider.js'\n\nexport const DocumentDrawerContent: React.FC<DocumentDrawerProps> = ({\n id: existingDocID,\n AfterFields,\n collectionSlug,\n disableActions,\n drawerSlug,\n Header,\n initialData,\n initialState,\n onDelete: onDeleteFromProps,\n onDuplicate: onDuplicateFromProps,\n onSave: onSaveFromProps,\n redirectAfterDelete,\n redirectAfterDuplicate,\n}) => {\n const {\n config: { collections },\n } = useConfig()\n\n const [collectionConfig] = useState(() =>\n collections.find((collection) => collection.slug === collectionSlug),\n )\n\n const documentViewAbortControllerRef = React.useRef<AbortController>(null)\n\n const { closeModal } = useModal()\n const { t } = useTranslation()\n\n const { renderDocument } = useServerFunctions()\n\n const [DocumentView, setDocumentView] = useState<React.ReactNode>(undefined)\n const [isLoading, setIsLoading] = useState(true)\n const hasRenderedDocument = useRef(false)\n\n const getDocumentView = useCallback(\n (docID?: number | string) => {\n abortAndIgnore(documentViewAbortControllerRef.current)\n\n const controller = new AbortController()\n documentViewAbortControllerRef.current = controller\n\n const fetchDocumentView = async () => {\n setIsLoading(true)\n\n try {\n const result = await renderDocument({\n collectionSlug,\n disableActions,\n docID,\n drawerSlug,\n initialData,\n redirectAfterDelete: redirectAfterDelete !== undefined ? redirectAfterDelete : false,\n redirectAfterDuplicate:\n redirectAfterDuplicate !== undefined ? redirectAfterDuplicate : false,\n signal: controller.signal,\n })\n\n if (result?.Document) {\n setDocumentView(result.Document)\n setIsLoading(false)\n }\n } catch (error) {\n toast.error(error?.message || t('error:unspecific'))\n closeModal(drawerSlug)\n // toast.error(data?.errors?.[0].message || t('error:unspecific'))\n }\n }\n\n void fetchDocumentView()\n },\n [\n collectionSlug,\n disableActions,\n drawerSlug,\n initialData,\n redirectAfterDelete,\n redirectAfterDuplicate,\n renderDocument,\n closeModal,\n t,\n ],\n )\n\n const onSave = useCallback<DocumentDrawerProps['onSave']>(\n (args) => {\n getDocumentView(args.doc.id)\n\n if (typeof onSaveFromProps === 'function') {\n void onSaveFromProps({\n ...args,\n collectionConfig,\n })\n }\n },\n [onSaveFromProps, collectionConfig, getDocumentView],\n )\n\n const onDuplicate = useCallback<DocumentDrawerProps['onDuplicate']>(\n (args) => {\n getDocumentView(args.doc.id)\n\n if (typeof onDuplicateFromProps === 'function') {\n void onDuplicateFromProps({\n ...args,\n collectionConfig,\n })\n }\n },\n [onDuplicateFromProps, collectionConfig, getDocumentView],\n )\n\n const onDelete = useCallback<DocumentDrawerProps['onDelete']>(\n (args) => {\n if (typeof onDeleteFromProps === 'function') {\n void onDeleteFromProps({\n ...args,\n collectionConfig,\n })\n }\n\n closeModal(drawerSlug)\n },\n [onDeleteFromProps, closeModal, drawerSlug, collectionConfig],\n )\n\n const clearDoc = useCallback(() => {\n getDocumentView()\n }, [getDocumentView])\n\n useEffect(() => {\n if (!DocumentView && !hasRenderedDocument.current) {\n getDocumentView(existingDocID)\n hasRenderedDocument.current = true\n }\n }, [DocumentView, getDocumentView, existingDocID])\n\n // Cleanup any pending requests when the component unmounts\n useEffect(() => {\n return () => {\n abortAndIgnore(documentViewAbortControllerRef.current)\n }\n }, [])\n\n if (isLoading) {\n return <LoadingOverlay />\n }\n\n return (\n <DocumentDrawerContextProvider\n clearDoc={clearDoc}\n drawerSlug={drawerSlug}\n onDelete={onDelete}\n onDuplicate={onDuplicate}\n onSave={onSave}\n >\n {DocumentView}\n </DocumentDrawerContextProvider>\n )\n}\n"],"mappings":"AAAA;;;AAEA,SAASA,QAAQ,QAAQ;AACzB,OAAOC,KAAA,IAASC,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ;AAChE,SAASC,KAAK,QAAQ;AAItB,SAASC,cAAc,QAAQ;AAC/B,SAASC,SAAS,QAAQ;AAC1B,SAASC,kBAAkB,QAAQ;AACnC,SAASC,cAAc,QAAQ;AAC/B,SAASC,cAAc,QAAQ;AAC/B,SAASC,6BAA6B,QAAQ;AAE9C,OAAO,MAAMC,qBAAA,GAAuDA,CAAC;EACnEC,EAAA,EAAIC,aAAa;EACjBC,WAAW;EACXC,cAAc;EACdC,cAAc;EACdC,UAAU;EACVC,MAAM;EACNC,WAAW;EACXC,YAAY;EACZC,QAAA,EAAUC,iBAAiB;EAC3BC,WAAA,EAAaC,oBAAoB;EAC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