@payloadcms/plugin-nested-docs 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,7 +1,7 @@
1
1
  export const createBreadcrumbsField = (relationTo, overrides = {})=>({
2
2
  name: 'breadcrumbs',
3
- localized: true,
4
3
  type: 'array',
4
+ localized: true,
5
5
  ...overrides || {},
6
6
  admin: {
7
7
  readOnly: true,
@@ -10,32 +10,32 @@ export const createBreadcrumbsField = (relationTo, overrides = {})=>({
10
10
  fields: [
11
11
  {
12
12
  name: 'doc',
13
+ type: 'relationship',
13
14
  admin: {
14
15
  disabled: true
15
16
  },
16
17
  maxDepth: 0,
17
- relationTo,
18
- type: 'relationship'
18
+ relationTo
19
19
  },
20
20
  {
21
+ type: 'row',
21
22
  fields: [
22
23
  {
23
24
  name: 'url',
25
+ type: 'text',
24
26
  admin: {
25
27
  width: '50%'
26
28
  },
27
- label: 'URL',
28
- type: 'text'
29
+ label: 'URL'
29
30
  },
30
31
  {
31
32
  name: 'label',
33
+ type: 'text',
32
34
  admin: {
33
35
  width: '50%'
34
- },
35
- type: 'text'
36
+ }
36
37
  }
37
- ],
38
- type: 'row'
38
+ ]
39
39
  },
40
40
  ...overrides?.fields || []
41
41
  ]
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/fields/breadcrumbs.ts"],"sourcesContent":["import type { ArrayField, Field } from 'payload/types'\n\nexport const createBreadcrumbsField = (\n relationTo: string,\n overrides: Partial<ArrayField> = {},\n): Field => ({\n name: 'breadcrumbs',\n localized: true,\n type: 'array',\n ...(overrides || {}),\n admin: {\n readOnly: true,\n ...(overrides?.admin || {}),\n },\n fields: [\n {\n name: 'doc',\n admin: {\n disabled: true,\n },\n maxDepth: 0,\n relationTo,\n type: 'relationship',\n },\n {\n fields: [\n {\n name: 'url',\n admin: {\n width: '50%',\n },\n label: 'URL',\n type: 'text',\n },\n {\n name: 'label',\n admin: {\n width: '50%',\n },\n type: 'text',\n },\n ],\n type: 'row',\n },\n ...(overrides?.fields || []),\n ],\n})\n\nexport default createBreadcrumbsField\n"],"names":["createBreadcrumbsField","relationTo","overrides","name","localized","type","admin","readOnly","fields","disabled","maxDepth","width","label"],"mappings":"AAEA,OAAO,MAAMA,yBAAyB,CACpCC,YACAC,YAAiC,CAAC,CAAC,GACxB,CAAA;QACXC,MAAM;QACNC,WAAW;QACXC,MAAM;QACN,GAAIH,aAAa,CAAC,CAAC;QACnBI,OAAO;YACLC,UAAU;YACV,GAAIL,WAAWI,SAAS,CAAC,CAAC;QAC5B;QACAE,QAAQ;YACN;gBACEL,MAAM;gBACNG,OAAO;oBACLG,UAAU;gBACZ;gBACAC,UAAU;gBACVT;gBACAI,MAAM;YACR;YACA;gBACEG,QAAQ;oBACN;wBACEL,MAAM;wBACNG,OAAO;4BACLK,OAAO;wBACT;wBACAC,OAAO;wBACPP,MAAM;oBACR;oBACA;wBACEF,MAAM;wBACNG,OAAO;4BACLK,OAAO;wBACT;wBACAN,MAAM;oBACR;iBACD;gBACDA,MAAM;YACR;eACIH,WAAWM,UAAU,EAAE;SAC5B;IACH,CAAA,EAAE;AAEF,eAAeR,uBAAsB"}
1
+ {"version":3,"sources":["../../src/fields/breadcrumbs.ts"],"sourcesContent":["import type { ArrayField, Field } from 'payload/types'\n\nexport const createBreadcrumbsField = (\n relationTo: string,\n overrides: Partial<ArrayField> = {},\n): Field => ({\n name: 'breadcrumbs',\n type: 'array',\n localized: true,\n ...(overrides || {}),\n admin: {\n readOnly: true,\n ...(overrides?.admin || {}),\n },\n fields: [\n {\n name: 'doc',\n type: 'relationship',\n admin: {\n disabled: true,\n },\n maxDepth: 0,\n relationTo,\n },\n {\n type: 'row',\n fields: [\n {\n name: 'url',\n type: 'text',\n admin: {\n width: '50%',\n },\n label: 'URL',\n },\n {\n name: 'label',\n type: 'text',\n admin: {\n width: '50%',\n },\n },\n ],\n },\n ...(overrides?.fields || []),\n ],\n})\n\nexport default createBreadcrumbsField\n"],"names":["createBreadcrumbsField","relationTo","overrides","name","type","localized","admin","readOnly","fields","disabled","maxDepth","width","label"],"mappings":"AAEA,OAAO,MAAMA,yBAAyB,CACpCC,YACAC,YAAiC,CAAC,CAAC,GACxB,CAAA;QACXC,MAAM;QACNC,MAAM;QACNC,WAAW;QACX,GAAIH,aAAa,CAAC,CAAC;QACnBI,OAAO;YACLC,UAAU;YACV,GAAIL,WAAWI,SAAS,CAAC,CAAC;QAC5B;QACAE,QAAQ;YACN;gBACEL,MAAM;gBACNC,MAAM;gBACNE,OAAO;oBACLG,UAAU;gBACZ;gBACAC,UAAU;gBACVT;YACF;YACA;gBACEG,MAAM;gBACNI,QAAQ;oBACN;wBACEL,MAAM;wBACNC,MAAM;wBACNE,OAAO;4BACLK,OAAO;wBACT;wBACAC,OAAO;oBACT;oBACA;wBACET,MAAM;wBACNC,MAAM;wBACNE,OAAO;4BACLK,OAAO;wBACT;oBACF;iBACD;YACH;eACIT,WAAWM,UAAU,EAAE;SAC5B;IACH,CAAA,EAAE;AAEF,eAAeR,uBAAsB"}
@@ -6,9 +6,9 @@ export const createParentField = (relationTo, overrides)=>({
6
6
  },
7
7
  // filterOptions are assigned dynamically based on the pluginConfig
8
8
  // filterOptions: parentFilterOptions(),
9
+ type: 'relationship',
9
10
  maxDepth: 1,
10
11
  relationTo,
11
- type: 'relationship',
12
12
  ...overrides || {}
13
13
  });
14
14
  export default createParentField;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/fields/parent.ts"],"sourcesContent":["import type { SingleRelationshipField } from 'payload/types'\n\nexport const createParentField = (\n relationTo: string,\n overrides?: Partial<\n SingleRelationshipField & {\n hasMany: false\n }\n >,\n): SingleRelationshipField => ({\n name: 'parent',\n admin: {\n position: 'sidebar',\n ...(overrides?.admin || {}),\n },\n // filterOptions are assigned dynamically based on the pluginConfig\n // filterOptions: parentFilterOptions(),\n maxDepth: 1,\n relationTo,\n type: 'relationship',\n ...(overrides || {}),\n})\n\nexport default createParentField\n"],"names":["createParentField","relationTo","overrides","name","admin","position","maxDepth","type"],"mappings":"AAEA,OAAO,MAAMA,oBAAoB,CAC/BC,YACAC,YAK6B,CAAA;QAC7BC,MAAM;QACNC,OAAO;YACLC,UAAU;YACV,GAAIH,WAAWE,SAAS,CAAC,CAAC;QAC5B;QACA,mEAAmE;QACnE,wCAAwC;QACxCE,UAAU;QACVL;QACAM,MAAM;QACN,GAAIL,aAAa,CAAC,CAAC;IACrB,CAAA,EAAE;AAEF,eAAeF,kBAAiB"}
1
+ {"version":3,"sources":["../../src/fields/parent.ts"],"sourcesContent":["import type { SingleRelationshipField } from 'payload/types'\n\nexport const createParentField = (\n relationTo: string,\n overrides?: Partial<\n SingleRelationshipField & {\n hasMany: false\n }\n >,\n): SingleRelationshipField => ({\n name: 'parent',\n admin: {\n position: 'sidebar',\n ...(overrides?.admin || {}),\n },\n // filterOptions are assigned dynamically based on the pluginConfig\n // filterOptions: parentFilterOptions(),\n type: 'relationship',\n maxDepth: 1,\n relationTo,\n ...(overrides || {}),\n})\n\nexport default createParentField\n"],"names":["createParentField","relationTo","overrides","name","admin","position","type","maxDepth"],"mappings":"AAEA,OAAO,MAAMA,oBAAoB,CAC/BC,YACAC,YAK6B,CAAA;QAC7BC,MAAM;QACNC,OAAO;YACLC,UAAU;YACV,GAAIH,WAAWE,SAAS,CAAC,CAAC;QAC5B;QACA,mEAAmE;QACnE,wCAAwC;QACxCE,MAAM;QACNC,UAAU;QACVN;QACA,GAAIC,aAAa,CAAC,CAAC;IACrB,CAAA,EAAE;AAEF,eAAeF,kBAAiB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/plugin-nested-docs",
3
- "version": "3.0.0-alpha.47",
3
+ "version": "3.0.0-alpha.49",
4
4
  "description": "The official Nested Docs plugin for Payload",
5
5
  "repository": "https://github.com/payloadcms/payload",
6
6
  "license": "MIT",
@@ -11,14 +11,17 @@
11
11
  "type": "module",
12
12
  "devDependencies": {
13
13
  "@payloadcms/eslint-config": "1.1.1",
14
- "payload": "3.0.0-alpha.47"
14
+ "payload": "3.0.0-alpha.49"
15
15
  },
16
16
  "peerDependencies": {
17
- "payload": "3.0.0-alpha.47"
17
+ "payload": "3.0.0-alpha.49"
18
18
  },
19
- "exports": null,
20
- "publishConfig": {
21
- "registry": "https://registry.npmjs.org/"
19
+ "exports": {
20
+ ".": {
21
+ "import": "./dist/index.js",
22
+ "require": "./dist/index.js",
23
+ "types": "./dist/index.d.ts"
24
+ }
22
25
  },
23
26
  "files": [
24
27
  "dist",