@nexo-labs/payload-taxonomies 0.8.5 → 0.8.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.
- package/dist/buildTaxonomizedCollection.d.ts +2 -0
- package/dist/buildTaxonomizedCollection.js +8 -0
- package/dist/index.d.ts +4 -10
- package/dist/index.js +4 -1015
- package/dist/taxonomiesRelationshipFields.d.ts +3 -0
- package/dist/taxonomiesRelationshipFields.js +11 -0
- package/dist/taxonomy.d.ts +3 -0
- package/dist/taxonomy.js +36 -0
- package/package.json +4 -6
- package/dist/index.cjs +0 -1045
- package/dist/index.d.cts +0 -10
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "@nexo-labs/hegel";
|
|
2
|
+
import { COLLECTION_SLUG_TAXONOMY } from "./taxonomy";
|
|
3
|
+
export const taxonomyRelationship = {
|
|
4
|
+
name: "categories",
|
|
5
|
+
label: "Categorías",
|
|
6
|
+
type: "relationship",
|
|
7
|
+
relationTo: COLLECTION_SLUG_TAXONOMY,
|
|
8
|
+
defaultValue: [],
|
|
9
|
+
hasMany: true,
|
|
10
|
+
required: false,
|
|
11
|
+
};
|
package/dist/taxonomy.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export const COLLECTION_SLUG_TAXONOMY = 'taxonomy';
|
|
2
|
+
export const taxonomiesCollection = (config) => ({
|
|
3
|
+
...config,
|
|
4
|
+
slug: COLLECTION_SLUG_TAXONOMY,
|
|
5
|
+
labels: {
|
|
6
|
+
singular: 'Taxonomia',
|
|
7
|
+
plural: 'Taxonomias',
|
|
8
|
+
},
|
|
9
|
+
admin: {
|
|
10
|
+
useAsTitle: 'singular_name',
|
|
11
|
+
group: 'Contenido',
|
|
12
|
+
},
|
|
13
|
+
fields: [
|
|
14
|
+
{
|
|
15
|
+
name: 'singular_name',
|
|
16
|
+
label: 'Nombre singular',
|
|
17
|
+
type: 'text',
|
|
18
|
+
localized: true,
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: 'plural_name',
|
|
23
|
+
label: 'Nombre plural',
|
|
24
|
+
type: 'text',
|
|
25
|
+
localized: true,
|
|
26
|
+
required: false,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'payload',
|
|
30
|
+
label: 'Payload Adicional',
|
|
31
|
+
type: 'json',
|
|
32
|
+
required: false,
|
|
33
|
+
},
|
|
34
|
+
...(config.fields ?? []),
|
|
35
|
+
],
|
|
36
|
+
});
|
package/package.json
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexo-labs/payload-taxonomies",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.7",
|
|
4
4
|
"description": "Taxonomies for Payload CMS",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
9
|
-
"main": "./dist/index.
|
|
9
|
+
"main": "./dist/index.js",
|
|
10
10
|
"module": "./dist/index.js",
|
|
11
11
|
"types": "./dist/index.d.ts",
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
|
14
14
|
"types": "./dist/index.d.ts",
|
|
15
|
-
"import": "./dist/index.js"
|
|
16
|
-
"require": "./dist/index.cjs"
|
|
15
|
+
"import": "./dist/index.js"
|
|
17
16
|
}
|
|
18
17
|
},
|
|
19
18
|
"keywords": [
|
|
@@ -33,7 +32,6 @@
|
|
|
33
32
|
"eslint": "^9.0.0",
|
|
34
33
|
"payload": "3.35.1",
|
|
35
34
|
"rimraf": "^5.0.10",
|
|
36
|
-
"tsup": "^8.4.0",
|
|
37
35
|
"typescript": "^5.0.0",
|
|
38
36
|
"@nexo-labs/hegel": "0.0.0"
|
|
39
37
|
},
|
|
@@ -43,7 +41,7 @@
|
|
|
43
41
|
],
|
|
44
42
|
"scripts": {
|
|
45
43
|
"clean": "rimraf dist",
|
|
46
|
-
"build": "
|
|
44
|
+
"build": "tsc -p tsconfig.build.json",
|
|
47
45
|
"taxonomize": "node src/processor/runners/run-taxonomizer.mjs",
|
|
48
46
|
"process": "node src/processor/runners/run-processor.mjs",
|
|
49
47
|
"diagram": "node src/processor/runners/run-diagram-generator.mjs",
|