Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
1 line
1.4 KiB
Plaintext
1 line
1.4 KiB
Plaintext
{"version":3,"file":"getDocumentViewInfo.js","names":["getDocumentViewInfo","segments","tabSegment","versionSegment","documentSubViewType","viewType"],"sources":["../../../src/views/Root/getDocumentViewInfo.ts"],"sourcesContent":["import type { DocumentSubViewTypes, ViewTypes } from 'payload'\n\nexport function getDocumentViewInfo(segments: string[]): {\n documentSubViewType?: DocumentSubViewTypes\n viewType: ViewTypes\n} {\n const [tabSegment, versionSegment] = segments\n\n if (versionSegment) {\n if (tabSegment === 'versions') {\n return {\n documentSubViewType: 'version',\n viewType: 'version',\n }\n }\n } else {\n if (tabSegment === 'versions') {\n return {\n documentSubViewType: 'versions',\n viewType: 'document',\n }\n } else if (tabSegment === 'api') {\n return {\n documentSubViewType: 'api',\n viewType: 'document',\n }\n }\n }\n\n return {\n documentSubViewType: 'default',\n viewType: 'document',\n }\n}\n"],"mappings":"AAEA,OAAO,SAASA,oBAAoBC,QAAkB;EAIpD,MAAM,CAACC,UAAA,EAAYC,cAAA,CAAe,GAAGF,QAAA;EAErC,IAAIE,cAAA,EAAgB;IAClB,IAAID,UAAA,KAAe,YAAY;MAC7B,OAAO;QACLE,mBAAA,EAAqB;QACrBC,QAAA,EAAU;MACZ;IACF;EACF,OAAO;IACL,IAAIH,UAAA,KAAe,YAAY;MAC7B,OAAO;QACLE,mBAAA,EAAqB;QACrBC,QAAA,EAAU;MACZ;IACF,OAAO,IAAIH,UAAA,KAAe,OAAO;MAC/B,OAAO;QACLE,mBAAA,EAAqB;QACrBC,QAAA,EAAU;MACZ;IACF;EACF;EAEA,OAAO;IACLD,mBAAA,EAAqB;IACrBC,QAAA,EAAU;EACZ;AACF","ignoreList":[]} |