@payloadcms/plugin-search 3.0.0-beta.52 → 3.0.0-beta.53

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.client.d.ts","sourceRoot":"","sources":["../../../src/Search/ui/index.client.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,MAAM,OAAO,CAAA;AAazB,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EA6CnC,CAAA"}
1
+ {"version":3,"file":"index.client.d.ts","sourceRoot":"","sources":["../../../src/Search/ui/index.client.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAA;AAazB,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EA6CnC,CAAA"}
@@ -1,7 +1,6 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useWatchForm } from '@payloadcms/ui/forms/Form';
4
- import { useConfig } from '@payloadcms/ui/providers/Config';
3
+ import { useConfig, useWatchForm } from '@payloadcms/ui';
5
4
  import React from 'react';
6
5
  export const LinkToDocClient = ()=>{
7
6
  const form = useWatchForm();
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/Search/ui/index.client.tsx"],"sourcesContent":["'use client'\n\nimport type { FormState } from 'payload'\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 LinkToDocClient: React.FC = () => {\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","LinkToDocClient","form","fields","doc","value","relationTo","docId","config","routes","admin","adminRoute","serverURL","href","div","span","className","style","color","fontWeight","overflow","textOverflow","a"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AAIA,SAASA,YAAY,QAAQ,4BAA2B;AACxD,SAASC,SAAS,QAAQ,kCAAiC;AAC3D,OAAOC,WAAW,QAAO;AAazB,OAAO,MAAMC,kBAA4B;IACvC,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,MAACO;;0BACC,KAACA;0BACC,cAAA,KAACC;oBACCC,WAAU;oBACVC,OAAO;wBACLC,OAAO;oBACT;8BACD;;;0BAKH,KAACJ;gBACCG,OAAO;oBACLE,YAAY;oBACZC,UAAU;oBACVC,cAAc;gBAChB;0BAEA,cAAA,KAACC;oBAAET,MAAMA;8BAAOA;;;;;AAIxB,EAAC"}
1
+ {"version":3,"sources":["../../../src/Search/ui/index.client.tsx"],"sourcesContent":["'use client'\n\nimport type { FormState } from 'payload'\n\nimport { useConfig, useWatchForm } from '@payloadcms/ui'\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 LinkToDocClient: React.FC = () => {\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":["useConfig","useWatchForm","React","LinkToDocClient","form","fields","doc","value","relationTo","docId","config","routes","admin","adminRoute","serverURL","href","div","span","className","style","color","fontWeight","overflow","textOverflow","a"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AAIA,SAASA,SAAS,EAAEC,YAAY,QAAQ,iBAAgB;AACxD,OAAOC,WAAW,QAAO;AAazB,OAAO,MAAMC,kBAA4B;IACvC,MAAMC,OAAOH;IACb,MAAMI,SAASD,KAAKC,MAAM;IAE1B,MAAM,EACJC,KAAK,EACHC,OAAO,EAAEC,UAAU,EAAED,OAAOE,KAAK,EAAE,EACpC,EACF,GAAGJ;IAEJ,MAAMK,SAASV;IAEf,MAAM,EACJW,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,MAACO;;0BACC,KAACA;0BACC,cAAA,KAACC;oBACCC,WAAU;oBACVC,OAAO;wBACLC,OAAO;oBACT;8BACD;;;0BAKH,KAACJ;gBACCG,OAAO;oBACLE,YAAY;oBACZC,UAAU;oBACVC,cAAc;gBAChB;0BAEA,cAAA,KAACC;oBAAET,MAAMA;8BAAOA;;;;;AAIxB,EAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/plugin-search",
3
- "version": "3.0.0-beta.52",
3
+ "version": "3.0.0-beta.53",
4
4
  "description": "Search plugin for Payload",
5
5
  "keywords": [
6
6
  "payload",
@@ -22,13 +22,13 @@
22
22
  "exports": {
23
23
  ".": {
24
24
  "import": "./dist/index.js",
25
- "require": "./dist/index.js",
26
- "types": "./dist/index.d.ts"
25
+ "types": "./dist/index.d.ts",
26
+ "default": "./dist/index.js"
27
27
  },
28
28
  "./*": {
29
29
  "import": "./dist/exports/*.js",
30
- "require": "./dist/exports/*.js",
31
- "types": "./dist/exports/*.d.ts"
30
+ "types": "./dist/exports/*.d.ts",
31
+ "default": "./dist/exports/*.js"
32
32
  }
33
33
  },
34
34
  "main": "./dist/index.js",
@@ -38,19 +38,19 @@
38
38
  ],
39
39
  "dependencies": {
40
40
  "deepmerge": "4.3.1",
41
- "@payloadcms/ui": "3.0.0-beta.52"
41
+ "@payloadcms/ui": "3.0.0-beta.53"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/express": "^4.17.9",
45
45
  "@types/react": "npm:types-react@19.0.0-beta.2",
46
46
  "@types/react-dom": "npm:types-react-dom@19.0.0-beta.2",
47
47
  "@payloadcms/eslint-config": "1.1.1",
48
- "payload": "3.0.0-beta.52"
48
+ "payload": "3.0.0-beta.53"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "react": "^19.0.0 || ^19.0.0-rc-f994737d14-20240522",
52
52
  "react-dom": "^19.0.0 || ^19.0.0-rc-f994737d14-20240522",
53
- "payload": "3.0.0-beta.52"
53
+ "payload": "3.0.0-beta.53"
54
54
  },
55
55
  "publishConfig": {
56
56
  "registry": "https://registry.npmjs.org/"