@paris-ias/trees 2.0.18 → 2.0.19

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.
@@ -53,8 +53,7 @@ const selectiveDeepFreeze = (obj, path = []) => {
53
53
 
54
54
  const data = {
55
55
  "_defaults": {
56
- "name": "",
57
- "file": ""
56
+ "name": ""
58
57
  },
59
58
  "schema": {
60
59
  "name": {
@@ -67,17 +66,6 @@ const data = {
67
66
  "max": 200
68
67
  },
69
68
  "meta": "name"
70
- },
71
- "file": {
72
- "label": "file",
73
- "component": "TextField",
74
- "type": "PRIMITIVE",
75
- "rules": {
76
- "required": true,
77
- "min": 5,
78
- "max": 200
79
- },
80
- "meta": "file"
81
69
  }
82
70
  }
83
71
  };
@@ -1,19 +1,28 @@
1
1
  import type { Form } from "../../index"
2
2
 
3
3
  // Inline type definitions
4
+ export enum FileCategory {
5
+ Document = "DOCUMENT",
6
+ Image = "IMAGE",
7
+ Video = "VIDEO",
8
+ Audio = "AUDIO",
9
+ Dataset = "DATASET",
10
+ Software = "SOFTWARE",
11
+ Other = "OTHER",
12
+ }
13
+
4
14
  export interface Files {
5
15
  name: string
6
16
  url: URL
7
17
  size: number
8
18
  fileType: string
19
+ catetgory: FileCategory
9
20
  hash: string
10
21
  path: string
11
- file: string
12
- image?: Image
13
22
  thumb: URL
14
23
  createdAt: Date
15
24
  updatedAt: Date
16
- id: string
25
+ slug: string
17
26
  }
18
27
 
19
28
  export interface FormModule {
@@ -51,8 +51,7 @@ const selectiveDeepFreeze = (obj, path = []) => {
51
51
 
52
52
  const data = {
53
53
  "_defaults": {
54
- "name": "",
55
- "file": ""
54
+ "name": ""
56
55
  },
57
56
  "schema": {
58
57
  "name": {
@@ -65,17 +64,6 @@ const data = {
65
64
  "max": 200
66
65
  },
67
66
  "meta": "name"
68
- },
69
- "file": {
70
- "label": "file",
71
- "component": "TextField",
72
- "type": "PRIMITIVE",
73
- "rules": {
74
- "required": true,
75
- "min": 5,
76
- "max": 200
77
- },
78
- "meta": "file"
79
67
  }
80
68
  }
81
69
  };
@@ -14,17 +14,15 @@ query listFiles(
14
14
  createdAt
15
15
  file
16
16
  fileType
17
+ category
17
18
  hash
18
19
  slug
19
- image {
20
- alt
21
- backgroundColor
22
- caption
23
- copyright
24
- license
25
- licenseUrl
26
- url
27
- }
20
+ alt
21
+ backgroundColor
22
+ caption
23
+ copyright
24
+ license
25
+ licenseUrl
28
26
  name
29
27
  path
30
28
  size
@@ -174,6 +174,40 @@ const data = {
174
174
  "year": {
175
175
  "type": "Select",
176
176
  "value": ""
177
+ },
178
+ "category": {
179
+ "type": "Select",
180
+ "items": [
181
+ {
182
+ "text": "Document",
183
+ "value": "DOCUMENT"
184
+ },
185
+ {
186
+ "text": "Image",
187
+ "value": "IMAGE"
188
+ },
189
+ {
190
+ "text": "Video",
191
+ "value": "VIDEO"
192
+ },
193
+ {
194
+ "text": "Audio",
195
+ "value": "AUDIO"
196
+ },
197
+ {
198
+ "text": "Dataset",
199
+ "value": "DATASET"
200
+ },
201
+ {
202
+ "text": "Software",
203
+ "value": "SOFTWARE"
204
+ },
205
+ {
206
+ "text": "Other",
207
+ "value": "OTHER"
208
+ }
209
+ ],
210
+ "value": ""
177
211
  }
178
212
  },
179
213
  "limit": 20,
@@ -1,19 +1,28 @@
1
1
  import type { Sort, Views } from "../../index"
2
2
 
3
3
  // Inline type definitions
4
+ export enum FileCategory {
5
+ Document = "DOCUMENT",
6
+ Image = "IMAGE",
7
+ Video = "VIDEO",
8
+ Audio = "AUDIO",
9
+ Dataset = "DATASET",
10
+ Software = "SOFTWARE",
11
+ Other = "OTHER",
12
+ }
13
+
4
14
  export interface Files {
5
15
  name: string
6
16
  url: URL
7
17
  size: number
8
18
  fileType: string
19
+ catetgory: FileCategory
9
20
  hash: string
10
21
  path: string
11
- file: string
12
- image?: Image
13
22
  thumb: URL
14
23
  createdAt: Date
15
24
  updatedAt: Date
16
- id: string
25
+ slug: string
17
26
  }
18
27
 
19
28
  export interface ListModule {
@@ -172,6 +172,40 @@ const data = {
172
172
  "year": {
173
173
  "type": "Select",
174
174
  "value": ""
175
+ },
176
+ "category": {
177
+ "type": "Select",
178
+ "items": [
179
+ {
180
+ "text": "Document",
181
+ "value": "DOCUMENT"
182
+ },
183
+ {
184
+ "text": "Image",
185
+ "value": "IMAGE"
186
+ },
187
+ {
188
+ "text": "Video",
189
+ "value": "VIDEO"
190
+ },
191
+ {
192
+ "text": "Audio",
193
+ "value": "AUDIO"
194
+ },
195
+ {
196
+ "text": "Dataset",
197
+ "value": "DATASET"
198
+ },
199
+ {
200
+ "text": "Software",
201
+ "value": "SOFTWARE"
202
+ },
203
+ {
204
+ "text": "Other",
205
+ "value": "OTHER"
206
+ }
207
+ ],
208
+ "value": ""
175
209
  }
176
210
  },
177
211
  "limit": 20,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paris-ias/trees",
3
- "version": "2.0.18",
3
+ "version": "2.0.19",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",