@payloadcms/plugin-search 3.0.0-alpha.47 → 3.0.0-alpha.49
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":"index.d.ts","sourceRoot":"","sources":["../../../src/Search/ui/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,OAAO,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Search/ui/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,OAAO,EAAE,MAAM,eAAe,CAAA;AAIvD,OAAO,KAAK,MAAM,OAAO,CAAA;AAazB,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,OAAO,CA6CvC,CAAA"}
|
package/dist/Search/ui/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useWatchForm } from '@payloadcms/ui/forms/Form';
|
|
2
|
+
import { useConfig } from '@payloadcms/ui/providers/Config';
|
|
2
3
|
import React from 'react';
|
|
3
4
|
export const LinkToDoc = ()=>{
|
|
4
5
|
const form = useWatchForm();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Search/ui/index.tsx"],"sourcesContent":["import type { FormState, UIField } from 'payload/types'\n\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../src/Search/ui/index.tsx"],"sourcesContent":["import type { FormState, UIField } from 'payload/types'\n\nimport { useWatchForm } from '@payloadcms/ui/forms/Form'\nimport { useConfig } from '@payloadcms/ui/providers/Config'\nimport React from 'react'\n// TODO: fix this import to work in dev mode within the monorepo in a way that is backwards compatible with 1.x\n// import CopyToClipboard from 'payload/dist/admin/components/elements/CopyToClipboard'\n\ntype FieldsWithDoc = FormState & {\n doc: {\n value: {\n relationTo: string\n value: string\n }\n }\n}\n\nexport const LinkToDoc: React.FC<UIField> = () => {\n const form = useWatchForm()\n const fields = form.fields as FieldsWithDoc\n\n const {\n doc: {\n value: { relationTo, value: docId },\n },\n } = fields\n\n const config = useConfig()\n\n const {\n routes: {\n admin: adminRoute, // already includes leading slash\n },\n serverURL,\n } = config\n\n const href = `${serverURL}${adminRoute}/collections/${relationTo}/${docId}`\n\n return (\n <div>\n <div>\n <span\n className=\"label\"\n style={{\n color: '#9A9A9A',\n }}\n >\n Doc URL\n </span>\n {/* <CopyToClipboard value={href} /> */}\n </div>\n <div\n style={{\n fontWeight: '600',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n }}\n >\n <a href={href}>{href}</a>\n </div>\n </div>\n )\n}\n"],"names":["useWatchForm","useConfig","React","LinkToDoc","form","fields","doc","value","relationTo","docId","config","routes","admin","adminRoute","serverURL","href","div","span","className","style","color","fontWeight","overflow","textOverflow","a"],"mappings":"AAEA,SAASA,YAAY,QAAQ,4BAA2B;AACxD,SAASC,SAAS,QAAQ,kCAAiC;AAC3D,OAAOC,WAAW,QAAO;AAazB,OAAO,MAAMC,YAA+B;IAC1C,MAAMC,OAAOJ;IACb,MAAMK,SAASD,KAAKC,MAAM;IAE1B,MAAM,EACJC,KAAK,EACHC,OAAO,EAAEC,UAAU,EAAED,OAAOE,KAAK,EAAE,EACpC,EACF,GAAGJ;IAEJ,MAAMK,SAAST;IAEf,MAAM,EACJU,QAAQ,EACNC,OAAOC,UAAU,EAClB,EACDC,SAAS,EACV,GAAGJ;IAEJ,MAAMK,OAAO,CAAC,EAAED,UAAU,EAAED,WAAW,aAAa,EAAEL,WAAW,CAAC,EAAEC,MAAM,CAAC;IAE3E,qBACE,oBAACO,2BACC,oBAACA,2BACC,oBAACC;QACCC,WAAU;QACVC,OAAO;YACLC,OAAO;QACT;OACD,2BAKH,oBAACJ;QACCG,OAAO;YACLE,YAAY;YACZC,UAAU;YACVC,cAAc;QAChB;qBAEA,oBAACC;QAAET,MAAMA;OAAOA;AAIxB,EAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payloadcms/plugin-search",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.49",
|
|
4
4
|
"homepage:": "https://payloadcms.com",
|
|
5
5
|
"repository": "git@github.com:payloadcms/plugin-search.git",
|
|
6
6
|
"description": "Search plugin for Payload",
|
|
@@ -20,18 +20,18 @@
|
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
23
|
-
"payload": "3.0.0-alpha.
|
|
23
|
+
"payload": "3.0.0-alpha.49"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"deepmerge": "4.3.1",
|
|
27
|
-
"@payloadcms/ui": "3.0.0-alpha.
|
|
27
|
+
"@payloadcms/ui": "3.0.0-alpha.49"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/express": "^4.17.9",
|
|
31
31
|
"@types/react": "18.0.21",
|
|
32
32
|
"react": "^18.0.0",
|
|
33
33
|
"@payloadcms/eslint-config": "1.1.1",
|
|
34
|
-
"payload": "3.0.0-alpha.
|
|
34
|
+
"payload": "3.0.0-alpha.49"
|
|
35
35
|
},
|
|
36
36
|
"exports": null,
|
|
37
37
|
"publishConfig": {
|