@paris-ias/trees 2.0.18 → 2.0.20

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
@@ -18,6 +18,7 @@ input FileInput {
18
18
  size: Int
19
19
  fileType: String
20
20
  image: ImageInput
21
+ category: FileCategory
21
22
  }
22
23
 
23
24
  input VideoInput {
@@ -368,6 +369,7 @@ type File {
368
369
  url: AWSURL!
369
370
  size: Int!
370
371
  fileType: String!
372
+ category: FileCategory!
371
373
  hash: String!
372
374
  path: String!
373
375
  file: String!
@@ -376,6 +378,13 @@ type File {
376
378
  createdAt: AWSDateTime!
377
379
  updatedAt: AWSDateTime!
378
380
  score: Float
381
+ slug: string
382
+ alt: String
383
+ caption: String
384
+ copyright: String
385
+ license: String
386
+ licenseUrl: String
387
+ backgroundColor: String
379
388
  }
380
389
 
381
390
  type Image {
@@ -511,6 +520,15 @@ enum FellowshipType {
511
520
  IN_GROUP
512
521
  }
513
522
 
523
+ enum FileCategory {
524
+ IMAGE
525
+ VIDEO
526
+ AUDIO
527
+ DOCUMENT
528
+ ARCHIVE
529
+ OTHER
530
+ }
531
+
514
532
  input AppInput {
515
533
  name: String!
516
534
  description: String
@@ -202,6 +202,7 @@ type File {
202
202
  url: AWSURL!
203
203
  size: Int!
204
204
  fileType: String!
205
+ category: FileCategory!
205
206
  hash: String!
206
207
  path: String!
207
208
  file: String!
@@ -210,6 +211,13 @@ type File {
210
211
  createdAt: AWSDateTime!
211
212
  updatedAt: AWSDateTime!
212
213
  score: Float
214
+ slug: string
215
+ alt: String
216
+ caption: String
217
+ copyright: String
218
+ license: String
219
+ licenseUrl: String
220
+ backgroundColor: String
213
221
  }
214
222
 
215
223
  type Image {
@@ -345,6 +353,15 @@ enum FellowshipType {
345
353
  IN_GROUP
346
354
  }
347
355
 
356
+ enum FileCategory {
357
+ IMAGE
358
+ VIDEO
359
+ AUDIO
360
+ DOCUMENT
361
+ ARCHIVE
362
+ OTHER
363
+ }
364
+
348
365
  input AppInput {
349
366
  name: String!
350
367
  description: String
@@ -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.20",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",