@nexo-labs/payload-taxonomies 0.9.6 → 0.9.7

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,3 +1,9 @@
1
1
  import "@nexo-labs/hegel";
2
- import { Field } from "payload";
2
+ import { DefaultValue, Field, FilterOptions } from "payload";
3
3
  export declare const taxonomyRelationship: Field;
4
+ interface BuildTaxonomyRelationshipFieldProps {
5
+ filterOptions: FilterOptions;
6
+ defaultValue: DefaultValue;
7
+ }
8
+ export declare const buildTaxonomyRelationship: (field: BuildTaxonomyRelationshipFieldProps) => Field;
9
+ export {};
@@ -9,3 +9,13 @@ export const taxonomyRelationship = {
9
9
  hasMany: true,
10
10
  required: false,
11
11
  };
12
+ export const buildTaxonomyRelationship = (field) => ({
13
+ name: "categories",
14
+ label: "Categorías",
15
+ type: "relationship",
16
+ defaultValue: field?.defaultValue,
17
+ filterOptions: field?.filterOptions,
18
+ required: false,
19
+ hasMany: true,
20
+ relationTo: COLLECTION_SLUG_TAXONOMY,
21
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexo-labs/payload-taxonomies",
3
- "version": "0.9.6",
3
+ "version": "0.9.7",
4
4
  "description": "Taxonomies for Payload CMS",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -22,8 +22,8 @@
22
22
  "author": "",
23
23
  "license": "MIT",
24
24
  "peerDependencies": {
25
- "@payloadcms/ui": "^3.35.1",
26
- "payload": "3.35.1",
25
+ "@payloadcms/ui": "^3.37.0",
26
+ "payload": "3.37.0",
27
27
  "react": "^19.0.0",
28
28
  "@types/json-schema": "^7.0.11"
29
29
  },
@@ -31,7 +31,7 @@
31
31
  "@types/node": "^22.0.0",
32
32
  "@types/react": "npm:types-react@19.0.0-rc.1",
33
33
  "eslint": "^9.0.0",
34
- "payload": "3.35.1",
34
+ "payload": "3.37.0",
35
35
  "rimraf": "^5.0.10",
36
36
  "typescript": "^5.0.0",
37
37
  "@nexo-labs/hegel": "0.0.0"