@paris-ias/trees 2.0.21 → 2.0.22

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.
@@ -54,10 +54,7 @@ const selectiveDeepFreeze = (obj, path = []) => {
54
54
  const data = {
55
55
  "_defaults": {
56
56
  "name": "",
57
- "image": {
58
- "url": "",
59
- "licence": ""
60
- },
57
+ "image": "",
61
58
  "link": "",
62
59
  "color": "#FFFFFF",
63
60
  "video": "",
@@ -68,11 +65,11 @@ const data = {
68
65
  "label": "name",
69
66
  "type": "PRIMITIVE",
70
67
  "component": "TextField",
71
- "description": "The name of the ad",
68
+ "description": "The name of the ad (internal use only)",
72
69
  "rules": {
73
70
  "required": true,
74
71
  "min": 2,
75
- "max": 4
72
+ "max": 200
76
73
  },
77
74
  "meta": "name"
78
75
  },
@@ -80,20 +77,17 @@ const data = {
80
77
  "label": "image",
81
78
  "type": "DOCUMENT",
82
79
  "component": "ImagePicker",
83
- "description": "The logo of the app",
80
+ "description": "Picture to display for the action",
84
81
  "rules": {
85
82
  "required": true
86
83
  },
87
- "default": {
88
- "url": "",
89
- "licence": ""
90
- }
84
+ "default": ""
91
85
  },
92
86
  "link": {
93
87
  "label": "url",
94
88
  "type": "PRIMITIVE",
95
89
  "component": "TextField",
96
- "description": "The url of the app",
90
+ "description": "The url of the action should point to",
97
91
  "rules": {
98
92
  "required": true,
99
93
  "url": true
@@ -114,6 +108,7 @@ const data = {
114
108
  "video": {
115
109
  "label": "video",
116
110
  "component": "TextField",
111
+ "description": "For video actions only, will replace the picture by a video embed",
117
112
  "type": "DOCUMENT",
118
113
  "rules": {
119
114
  "url": true
@@ -123,12 +118,17 @@ const data = {
123
118
  },
124
119
  "slots": {
125
120
  "label": "slots",
126
- "component": "TextField",
121
+ "component": "Select",
127
122
  "type": "PRIMITIVE",
128
- "rules": {
129
- "required": true,
130
- "min": 5,
131
- "max": 200
123
+ "items": {
124
+ "All": "ALL",
125
+ "Fellowships": "FELLOWSHIPS",
126
+ "Network": "NETWORK",
127
+ "Projects": "PROJECTS",
128
+ "Events": "EVENTS",
129
+ "Publications": "PUBLICATIONS",
130
+ "News": "NEWS",
131
+ "People": "PEOPLE"
132
132
  },
133
133
  "meta": "slots"
134
134
  }
@@ -1,6 +1,17 @@
1
1
  import type { Form } from "../../index"
2
2
 
3
3
  // Inline type definitions
4
+ export enum ActionSlots {
5
+ All = "ALL",
6
+ Fellowships = "FELLOWSHIPS",
7
+ Network = "NETWORK",
8
+ Projects = "PROJECTS",
9
+ Events = "EVENTS",
10
+ Publications = "PUBLICATIONS",
11
+ News = "NEWS",
12
+ People = "PEOPLE",
13
+ }
14
+
4
15
  export interface Actions {
5
16
  color?: string
6
17
  link: string
@@ -52,10 +52,7 @@ const selectiveDeepFreeze = (obj, path = []) => {
52
52
  const data = {
53
53
  "_defaults": {
54
54
  "name": "",
55
- "image": {
56
- "url": "",
57
- "licence": ""
58
- },
55
+ "image": "",
59
56
  "link": "",
60
57
  "color": "#FFFFFF",
61
58
  "video": "",
@@ -66,11 +63,11 @@ const data = {
66
63
  "label": "name",
67
64
  "type": "PRIMITIVE",
68
65
  "component": "TextField",
69
- "description": "The name of the ad",
66
+ "description": "The name of the ad (internal use only)",
70
67
  "rules": {
71
68
  "required": true,
72
69
  "min": 2,
73
- "max": 4
70
+ "max": 200
74
71
  },
75
72
  "meta": "name"
76
73
  },
@@ -78,20 +75,17 @@ const data = {
78
75
  "label": "image",
79
76
  "type": "DOCUMENT",
80
77
  "component": "ImagePicker",
81
- "description": "The logo of the app",
78
+ "description": "Picture to display for the action",
82
79
  "rules": {
83
80
  "required": true
84
81
  },
85
- "default": {
86
- "url": "",
87
- "licence": ""
88
- }
82
+ "default": ""
89
83
  },
90
84
  "link": {
91
85
  "label": "url",
92
86
  "type": "PRIMITIVE",
93
87
  "component": "TextField",
94
- "description": "The url of the app",
88
+ "description": "The url of the action should point to",
95
89
  "rules": {
96
90
  "required": true,
97
91
  "url": true
@@ -112,6 +106,7 @@ const data = {
112
106
  "video": {
113
107
  "label": "video",
114
108
  "component": "TextField",
109
+ "description": "For video actions only, will replace the picture by a video embed",
115
110
  "type": "DOCUMENT",
116
111
  "rules": {
117
112
  "url": true
@@ -121,12 +116,17 @@ const data = {
121
116
  },
122
117
  "slots": {
123
118
  "label": "slots",
124
- "component": "TextField",
119
+ "component": "Select",
125
120
  "type": "PRIMITIVE",
126
- "rules": {
127
- "required": true,
128
- "min": 5,
129
- "max": 200
121
+ "items": {
122
+ "All": "ALL",
123
+ "Fellowships": "FELLOWSHIPS",
124
+ "Network": "NETWORK",
125
+ "Projects": "PROJECTS",
126
+ "Events": "EVENTS",
127
+ "Publications": "PUBLICATIONS",
128
+ "News": "NEWS",
129
+ "People": "PEOPLE"
130
130
  },
131
131
  "meta": "slots"
132
132
  }
@@ -58,19 +58,11 @@ const data = {
58
58
  "fr": ""
59
59
  },
60
60
  "image": "",
61
- "location": {
62
- "name": "",
63
- "details": "",
64
- "alt": "",
65
- "street": "",
66
- "city": "",
67
- "country": "",
68
- "zip": "",
69
- "geocode": {
70
- "lat": "",
71
- "lng": ""
61
+ "locations": [
62
+ {
63
+ "locations": {}
72
64
  }
73
- },
65
+ ],
74
66
  "ror": "",
75
67
  "url": ""
76
68
  },
@@ -94,125 +86,29 @@ const data = {
94
86
  "meta": "image",
95
87
  "default": ""
96
88
  },
97
- "location": {
98
- "label": "location",
99
- "component": "ObjectContainerPanel",
100
- "type": "OBJECT",
101
- "meta": "location",
89
+ "locations": {
90
+ "label": "locations",
91
+ "component": "CollectionContainerPanel",
92
+ "type": "ARRAY",
102
93
  "items": {
103
- "name": {
104
- "label": "name",
105
- "component": "TextField",
106
- "type": "PRIMITIVE",
107
- "rules": {
108
- "required": true,
109
- "min": 5,
110
- "max": 200
111
- },
112
- "meta": "name"
113
- },
114
- "details": {
115
- "label": "details",
116
- "component": "TextArea",
117
- "type": "PRIMITIVE",
118
- "rules": {
119
- "required": true,
120
- "min": 5,
121
- "max": 200
122
- },
123
- "meta": "details"
124
- },
125
- "alt": {
126
- "label": "alt",
127
- "component": "TextArea",
128
- "type": "PRIMITIVE",
129
- "rules": {
130
- "required": true,
131
- "min": 5,
132
- "max": 200
133
- },
134
- "meta": "alt"
135
- },
136
- "street": {
137
- "label": "street",
138
- "component": "TextField",
139
- "type": "PRIMITIVE",
140
- "rules": {
141
- "required": true,
142
- "max": 200
143
- },
144
- "meta": "street"
145
- },
146
- "city": {
147
- "label": "city",
148
- "component": "TextField",
149
- "type": "PRIMITIVE",
150
- "rules": {
151
- "required": true,
152
- "max": 200
153
- },
154
- "meta": "city"
155
- },
156
- "country": {
157
- "label": "country",
158
- "component": "AutoComplete",
159
- "type": "PRIMITIVE",
160
- "meta": "country"
161
- },
162
- "zip": {
163
- "label": "zip",
164
- "component": "TextField",
165
- "type": "PRIMITIVE",
166
- "rules": {
167
- "required": true,
168
- "min": 5,
169
- "max": 200
170
- },
171
- "meta": "zip"
172
- },
173
- "geocode": {
174
- "label": "geocode",
175
- "component": "LocationPicker",
176
- "type": "OBJECT",
177
- "rules": {
178
- "required": true,
179
- "min": 5,
180
- "max": 200
181
- },
182
- "items": {
183
- "lat": {
184
- "label": "latitude",
185
- "component": "TextField",
186
- "type": "PRIMITIVE",
187
- "rules": {
188
- "required": true,
189
- "min": 5,
190
- "max": 200
191
- },
192
- "meta": "latitude"
193
- },
194
- "lng": {
195
- "label": "longitude",
196
- "component": "TextField",
197
- "type": "PRIMITIVE",
198
- "rules": {
199
- "required": true,
200
- "min": 5,
201
- "max": 200
202
- },
203
- "meta": "longitude"
204
- }
205
- },
206
- "meta": "geocode"
94
+ "locations": {
95
+ "label": "location",
96
+ "component": "ObjectContainerPanel",
97
+ "type": "TEMPLATE",
98
+ "meta": "location",
99
+ "items": {}
207
100
  }
208
- }
101
+ },
102
+ "meta": "locations"
209
103
  },
210
104
  "ror": {
211
105
  "label": "ror",
212
106
  "component": "TextField",
213
107
  "type": "PRIMITIVE",
108
+ "transformers": [
109
+ "CANDIDATES"
110
+ ],
214
111
  "rules": {
215
- "required": true,
216
112
  "ror": true
217
113
  },
218
114
  "meta": "ror"
@@ -222,7 +118,6 @@ const data = {
222
118
  "component": "TextField",
223
119
  "type": "PRIMITIVE",
224
120
  "rules": {
225
- "required": true,
226
121
  "url": true
227
122
  },
228
123
  "meta": "url"
@@ -56,19 +56,11 @@ const data = {
56
56
  "fr": ""
57
57
  },
58
58
  "image": "",
59
- "location": {
60
- "name": "",
61
- "details": "",
62
- "alt": "",
63
- "street": "",
64
- "city": "",
65
- "country": "",
66
- "zip": "",
67
- "geocode": {
68
- "lat": "",
69
- "lng": ""
59
+ "locations": [
60
+ {
61
+ "locations": {}
70
62
  }
71
- },
63
+ ],
72
64
  "ror": "",
73
65
  "url": ""
74
66
  },
@@ -92,125 +84,29 @@ const data = {
92
84
  "meta": "image",
93
85
  "default": ""
94
86
  },
95
- "location": {
96
- "label": "location",
97
- "component": "ObjectContainerPanel",
98
- "type": "OBJECT",
99
- "meta": "location",
87
+ "locations": {
88
+ "label": "locations",
89
+ "component": "CollectionContainerPanel",
90
+ "type": "ARRAY",
100
91
  "items": {
101
- "name": {
102
- "label": "name",
103
- "component": "TextField",
104
- "type": "PRIMITIVE",
105
- "rules": {
106
- "required": true,
107
- "min": 5,
108
- "max": 200
109
- },
110
- "meta": "name"
111
- },
112
- "details": {
113
- "label": "details",
114
- "component": "TextArea",
115
- "type": "PRIMITIVE",
116
- "rules": {
117
- "required": true,
118
- "min": 5,
119
- "max": 200
120
- },
121
- "meta": "details"
122
- },
123
- "alt": {
124
- "label": "alt",
125
- "component": "TextArea",
126
- "type": "PRIMITIVE",
127
- "rules": {
128
- "required": true,
129
- "min": 5,
130
- "max": 200
131
- },
132
- "meta": "alt"
133
- },
134
- "street": {
135
- "label": "street",
136
- "component": "TextField",
137
- "type": "PRIMITIVE",
138
- "rules": {
139
- "required": true,
140
- "max": 200
141
- },
142
- "meta": "street"
143
- },
144
- "city": {
145
- "label": "city",
146
- "component": "TextField",
147
- "type": "PRIMITIVE",
148
- "rules": {
149
- "required": true,
150
- "max": 200
151
- },
152
- "meta": "city"
153
- },
154
- "country": {
155
- "label": "country",
156
- "component": "AutoComplete",
157
- "type": "PRIMITIVE",
158
- "meta": "country"
159
- },
160
- "zip": {
161
- "label": "zip",
162
- "component": "TextField",
163
- "type": "PRIMITIVE",
164
- "rules": {
165
- "required": true,
166
- "min": 5,
167
- "max": 200
168
- },
169
- "meta": "zip"
170
- },
171
- "geocode": {
172
- "label": "geocode",
173
- "component": "LocationPicker",
174
- "type": "OBJECT",
175
- "rules": {
176
- "required": true,
177
- "min": 5,
178
- "max": 200
179
- },
180
- "items": {
181
- "lat": {
182
- "label": "latitude",
183
- "component": "TextField",
184
- "type": "PRIMITIVE",
185
- "rules": {
186
- "required": true,
187
- "min": 5,
188
- "max": 200
189
- },
190
- "meta": "latitude"
191
- },
192
- "lng": {
193
- "label": "longitude",
194
- "component": "TextField",
195
- "type": "PRIMITIVE",
196
- "rules": {
197
- "required": true,
198
- "min": 5,
199
- "max": 200
200
- },
201
- "meta": "longitude"
202
- }
203
- },
204
- "meta": "geocode"
92
+ "locations": {
93
+ "label": "location",
94
+ "component": "ObjectContainerPanel",
95
+ "type": "TEMPLATE",
96
+ "meta": "location",
97
+ "items": {}
205
98
  }
206
- }
99
+ },
100
+ "meta": "locations"
207
101
  },
208
102
  "ror": {
209
103
  "label": "ror",
210
104
  "component": "TextField",
211
105
  "type": "PRIMITIVE",
106
+ "transformers": [
107
+ "CANDIDATES"
108
+ ],
212
109
  "rules": {
213
- "required": true,
214
110
  "ror": true
215
111
  },
216
112
  "meta": "ror"
@@ -220,7 +116,6 @@ const data = {
220
116
  "component": "TextField",
221
117
  "type": "PRIMITIVE",
222
118
  "rules": {
223
- "required": true,
224
119
  "url": true
225
120
  },
226
121
  "meta": "url"
@@ -117,9 +117,9 @@ const data = {
117
117
  "label": "summary",
118
118
  "component": "TextArea",
119
119
  "type": "PRIMITIVE",
120
+ "description": "Will be extracted from description if left empty",
120
121
  "i18n": true,
121
122
  "rules": {
122
- "required": true,
123
123
  "min": 5,
124
124
  "max": 200
125
125
  },
package/dist/form/apps.js CHANGED
@@ -115,9 +115,9 @@ const data = {
115
115
  "label": "summary",
116
116
  "component": "TextArea",
117
117
  "type": "PRIMITIVE",
118
+ "description": "Will be extracted from description if left empty",
118
119
  "i18n": true,
119
120
  "rules": {
120
- "required": true,
121
121
  "min": 5,
122
122
  "max": 200
123
123
  },
@@ -54,7 +54,8 @@ const selectiveDeepFreeze = (obj, path = []) => {
54
54
  const data = {
55
55
  "_defaults": {
56
56
  "name": "",
57
- "description": ""
57
+ "description": "",
58
+ "image": ""
58
59
  },
59
60
  "schema": {
60
61
  "name": {
@@ -75,9 +76,19 @@ const data = {
75
76
  "rules": {
76
77
  "required": true,
77
78
  "min": 5,
78
- "max": 200
79
+ "max": 2000
79
80
  },
80
81
  "meta": "description"
82
+ },
83
+ "image": {
84
+ "label": "image",
85
+ "component": "ImagePicker",
86
+ "type": "DOCUMENT",
87
+ "rules": {
88
+ "required": true
89
+ },
90
+ "meta": "image",
91
+ "default": ""
81
92
  }
82
93
  }
83
94
  };
@@ -52,7 +52,8 @@ const selectiveDeepFreeze = (obj, path = []) => {
52
52
  const data = {
53
53
  "_defaults": {
54
54
  "name": "",
55
- "description": ""
55
+ "description": "",
56
+ "image": ""
56
57
  },
57
58
  "schema": {
58
59
  "name": {
@@ -73,9 +74,19 @@ const data = {
73
74
  "rules": {
74
75
  "required": true,
75
76
  "min": 5,
76
- "max": 200
77
+ "max": 2000
77
78
  },
78
79
  "meta": "description"
80
+ },
81
+ "image": {
82
+ "label": "image",
83
+ "component": "ImagePicker",
84
+ "type": "DOCUMENT",
85
+ "rules": {
86
+ "required": true
87
+ },
88
+ "meta": "image",
89
+ "default": ""
79
90
  }
80
91
  }
81
92
  };