@paris-ias/trees 1.8.57 → 2.0.1

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.
Files changed (172) hide show
  1. package/dist/form/actions.d.ts +130 -0
  2. package/dist/form/affiliations.d.ts +293 -0
  3. package/dist/form/apps.d.ts +210 -0
  4. package/dist/form/disciplines.d.ts +41 -0
  5. package/dist/form/events.d.ts +1398 -0
  6. package/dist/form/fellowships.d.ts +2123 -0
  7. package/dist/form/files.d.ts +41 -0
  8. package/dist/form/mailing.d.ts +63 -0
  9. package/dist/form/news.d.ts +406 -0
  10. package/dist/form/people.d.ts +1063 -0
  11. package/dist/form/projects.d.ts +565 -0
  12. package/dist/form/publications.d.ts +616 -0
  13. package/dist/form/tags.d.ts +55 -0
  14. package/dist/form/users.d.ts +947 -0
  15. package/dist/graphql/client/events/query.list.events.gql +0 -1
  16. package/dist/graphql/schemas/apex-resolvers-list.json +45 -0
  17. package/dist/graphql/schemas/schema.apex.graphql +34 -6
  18. package/dist/graphql/schemas/schema.website.graphql +31 -4
  19. package/dist/graphql/schemas/website-resolvers-list.json +21 -0
  20. package/dist/list/actions.d.ts +104 -0
  21. package/dist/list/affiliations.d.ts +104 -0
  22. package/dist/list/apps.d.ts +104 -0
  23. package/dist/list/disciplines.d.ts +102 -0
  24. package/dist/list/events.d.ts +173 -0
  25. package/dist/list/fellowships.d.ts +124 -0
  26. package/dist/list/files.d.ts +102 -0
  27. package/dist/list/mailing.d.ts +102 -0
  28. package/dist/list/news.d.ts +104 -0
  29. package/dist/list/people.d.ts +154 -0
  30. package/dist/list/projects.d.ts +104 -0
  31. package/dist/list/publications.d.ts +128 -0
  32. package/dist/list/tags.d.ts +104 -0
  33. package/dist/list/users.d.ts +154 -0
  34. package/index.d.ts +31 -0
  35. package/package.json +177 -14
  36. package/readme.md +1 -1
  37. package/index.ts +0 -63
  38. package/lib/README.md +0 -206
  39. package/lib/buildClientGraphQL.ts +0 -342
  40. package/lib/buildDefaults.ts +0 -0
  41. package/lib/buildSchemas.ts +0 -109
  42. package/lib/generate.ts +0 -505
  43. package/lib/generateAll.ts +0 -231
  44. package/lib/utils.ts +0 -24
  45. package/src/LICENSE +0 -661
  46. package/src/actions/graphql/client/query.get.actions.gql +0 -22
  47. package/src/actions/graphql/client/query.list.actions.gql +0 -32
  48. package/src/actions/graphql/server/apex.types.actions.graphql +0 -15
  49. package/src/actions/models/actions.ts +0 -147
  50. package/src/affiliations/graphql/client/query.get.affiliations.gql +0 -37
  51. package/src/affiliations/graphql/client/query.list.affiliations.gql +0 -43
  52. package/src/affiliations/graphql/server/shared.types.affiliations.graphql +0 -20
  53. package/src/affiliations/models/affiliations.ts +0 -130
  54. package/src/affiliations/models/members.ts +0 -11
  55. package/src/affiliations/models/partners.ts +0 -9
  56. package/src/apps/graphql/client/query.get.apps.gql +0 -33
  57. package/src/apps/graphql/client/query.list.apps.gql +0 -43
  58. package/src/apps/models/apps.ts +0 -195
  59. package/src/events/graphql/client/query.get.events.gql +0 -119
  60. package/src/events/graphql/client/query.list.events.gql +0 -40
  61. package/src/events/graphql/server/shared.inputs.events.graphql +0 -24
  62. package/src/events/models/eventSlot.ts +0 -73
  63. package/src/events/models/events.ts +0 -569
  64. package/src/fellowships/graphql/client/query.get.fellowships.gql +0 -163
  65. package/src/fellowships/graphql/client/query.list.fellowships.gql +0 -49
  66. package/src/fellowships/graphql/server/apex.inputs.fellowshipDetails.graphql +0 -13
  67. package/src/fellowships/graphql/server/shared.types.fellowshipDetails.graphql +0 -13
  68. package/src/fellowships/graphql/server/shared.types.fellowships.graphql +0 -38
  69. package/src/fellowships/models/fellowshipDetails.ts +0 -145
  70. package/src/fellowships/models/fellowships.ts +0 -341
  71. package/src/files/graphql/client/query.get.files.gql +0 -24
  72. package/src/files/graphql/client/query.list.files.gql +0 -37
  73. package/src/files/graphql/server/apex.inputs.files.graphql +0 -7
  74. package/src/files/graphql/server/apex.inputs.video.graphql +0 -9
  75. package/src/files/graphql/server/apex.types.files.graphql +0 -4
  76. package/src/files/graphql/server/shared.inputs.image.graphql +0 -9
  77. package/src/files/graphql/server/shared.types.files.graphql +0 -15
  78. package/src/files/graphql/server/shared.types.image.graphql +0 -9
  79. package/src/files/graphql/server/shared.types.video.graphql +0 -9
  80. package/src/files/models/files.ts +0 -113
  81. package/src/files/models/gallery.ts +0 -11
  82. package/src/files/models/image.ts +0 -159
  83. package/src/files/models/video.ts +0 -166
  84. package/src/form.ts +0 -52
  85. package/src/index.ts +0 -98
  86. package/src/list.ts +0 -34
  87. package/src/mailing/graphql/client/query.get.mailing.gql +0 -24
  88. package/src/mailing/graphql/client/query.list.mailing.gql +0 -23
  89. package/src/mailing/graphql/server/apex.types.mailing.graphql +0 -13
  90. package/src/mailing/models/mailing.ts +0 -123
  91. package/src/misc/graphql/client/apex.mutations.delete.gql +0 -0
  92. package/src/misc/graphql/client/apex.mutations.upsert.gql +0 -0
  93. package/src/misc/graphql/client/apex.queries.login.gql +0 -0
  94. package/src/misc/graphql/client/query.get.disciplines.gql +0 -17
  95. package/src/misc/graphql/client/query.get.tags.gql +0 -13
  96. package/src/misc/graphql/client/query.list.disciplines.gql +0 -23
  97. package/src/misc/graphql/client/query.list.tags.gql +0 -23
  98. package/src/misc/graphql/server/apex.inputs.misc.graphql +0 -13
  99. package/src/misc/graphql/server/apex.inputs.socials.graphql +0 -12
  100. package/src/misc/graphql/server/apex.mutations.graphql +0 -23
  101. package/src/misc/graphql/server/apex.queries.graphql +0 -36
  102. package/src/misc/graphql/server/apex.types.disciplines.graphql +0 -4
  103. package/src/misc/graphql/server/apex.types.tags.graphql +0 -4
  104. package/src/misc/graphql/server/shared.enums.graphql +0 -112
  105. package/src/misc/graphql/server/shared.inputs.misc.graphql +0 -101
  106. package/src/misc/graphql/server/shared.queries.graphql +0 -35
  107. package/src/misc/graphql/server/shared.types.disciplines.graphql +0 -8
  108. package/src/misc/graphql/server/shared.types.events.graphql +0 -39
  109. package/src/misc/graphql/server/shared.types.location.graphql +0 -17
  110. package/src/misc/graphql/server/shared.types.misc.graphql +0 -120
  111. package/src/misc/graphql/server/shared.types.related.graphql +0 -10
  112. package/src/misc/graphql/server/shared.types.relatedAffiliation.graphql +0 -7
  113. package/src/misc/graphql/server/shared.types.relatedEvent.graphql +0 -7
  114. package/src/misc/graphql/server/shared.types.relatedFellowships.graphql +0 -7
  115. package/src/misc/graphql/server/shared.types.relatedNews.graphql +0 -7
  116. package/src/misc/graphql/server/shared.types.relatedPeople.graphql +0 -6
  117. package/src/misc/graphql/server/shared.types.relatedProject.graphql +0 -7
  118. package/src/misc/graphql/server/shared.types.relatedPublications.graphql +0 -6
  119. package/src/misc/graphql/server/shared.types.socials.graphql +0 -22
  120. package/src/misc/graphql/server/shared.types.tags.graphql +0 -11
  121. package/src/misc/graphql/server/website.mutations.graphql +0 -4
  122. package/src/misc/models/disciplines.ts +0 -116
  123. package/src/misc/models/location.ts +0 -136
  124. package/src/misc/models/organizers.ts +0 -13
  125. package/src/misc/models/related.ts +0 -123
  126. package/src/misc/models/relatedEvents.ts +0 -16
  127. package/src/misc/models/relatedFellowships.ts +0 -7
  128. package/src/misc/models/relatedNews.ts +0 -13
  129. package/src/misc/models/relatedPeople.ts +0 -8
  130. package/src/misc/models/relatedProject.ts +0 -14
  131. package/src/misc/models/relatedPublications.ts +0 -14
  132. package/src/misc/models/socials.ts +0 -133
  133. package/src/misc/models/sponsor.ts +0 -13
  134. package/src/misc/models/tags.ts +0 -116
  135. package/src/misc/models/taxonomy.ts +0 -1
  136. package/src/model.ts +0 -7
  137. package/src/news/graphql/client/query.get.news.gql +0 -128
  138. package/src/news/graphql/client/query.list.news.gql +0 -35
  139. package/src/news/graphql/server/share.types.news.graphql +0 -27
  140. package/src/news/models/news.ts +0 -257
  141. package/src/people/graphql/client/query.get.people.gql +0 -173
  142. package/src/people/graphql/client/query.get.users.gql +0 -0
  143. package/src/people/graphql/client/query.list.people.gql +0 -55
  144. package/src/people/graphql/client/query.list.users.gql +0 -31
  145. package/src/people/graphql/server/apex.inputs.consent.graphql +0 -9
  146. package/src/people/graphql/server/apex.inputs.groups.graphql +0 -8
  147. package/src/people/graphql/server/apex.inputs.vintage.graphql +0 -6
  148. package/src/people/graphql/server/shared.types.consent.graphql +0 -9
  149. package/src/people/graphql/server/shared.types.groups.graphql +0 -8
  150. package/src/people/graphql/server/shared.types.people.graphql +0 -29
  151. package/src/people/graphql/server/shared.types.position.graphql +0 -6
  152. package/src/people/graphql/server/shared.types.users.graphql +0 -17
  153. package/src/people/graphql/server/shared.types.vintage.graphql +0 -6
  154. package/src/people/models/consent.ts +0 -82
  155. package/src/people/models/discussants.ts +0 -9
  156. package/src/people/models/experiences.ts +0 -38
  157. package/src/people/models/fellows.ts +0 -12
  158. package/src/people/models/groups.ts +0 -58
  159. package/src/people/models/people.ts +0 -243
  160. package/src/people/models/position.ts +0 -62
  161. package/src/people/models/speakers.ts +0 -9
  162. package/src/people/models/users.ts +0 -252
  163. package/src/people/models/vintage.ts +0 -124
  164. package/src/projects/graphql/client/query.get.projects.gql +0 -166
  165. package/src/projects/graphql/client/query.list.projects.gql +0 -33
  166. package/src/projects/graphql/server/shared.types.projects.graphql +0 -29
  167. package/src/projects/models/projects.ts +0 -249
  168. package/src/publications/graphql/client/query.get.publications.gql +0 -169
  169. package/src/publications/graphql/client/query.list.publications.gql +0 -35
  170. package/src/publications/graphql/server/shared.types.publications.graphql +0 -34
  171. package/src/publications/models/article.ts +0 -262
  172. package/src/publications/models/publications.ts +0 -306
@@ -1,243 +0,0 @@
1
- import { Affiliations } from "../../affiliations/models/affiliations"
2
- import { Image } from "../../files/models/image"
3
- import { Socials } from "../../misc/models/socials"
4
- import { Position } from "./position"
5
- import { Consent } from "./consent"
6
- import { Groups } from "./groups"
7
- import { Disciplines } from "../../misc/models/disciplines"
8
- import { Video } from "../../files/models/video"
9
- import Model from "../../model"
10
- import { Related } from "../../misc/models/related"
11
- import { formType, Transformers } from "../../form"
12
- import { userRole } from "./users"
13
-
14
- export interface People {
15
- name: string
16
- firstname: string
17
- lastname: string
18
- affiliations?: [{ affiliation: Affiliations; positions: [Position] }]
19
- image?: Image
20
- socials?: Socials
21
- biography?: string
22
- consent: Consent
23
- groups: Groups
24
- lang: string
25
- disciplines?: Disciplines[]
26
- related?: Related[]
27
- video?: Video[]
28
- }
29
-
30
- const defaultConfig: Model = {
31
- list: {
32
- create: true, // allow to create new items
33
-
34
- filters: {
35
- groups: {
36
- type: "Select",
37
- },
38
- vintage: {
39
- type: "Select",
40
- show: {
41
- default: false, // same as hidden = true
42
- switchIf: [{ groups: "fellows" }], // array of conditions to switch the show, each condition will be assessed as a boolean
43
- disjonctive: false, //TODO: implement. if true, show only if one of the if is true, if false, show only if all of the if are true
44
- },
45
- multiple: true,
46
- },
47
- programs: {
48
- type: "Select",
49
- show: {
50
- default: false, // same as hidden = true
51
- switchIf: [{ groups: "fellows" }], // array of conditions to switch the show, each condition will be assessed as a boolean
52
- disjonctive: false, //TODO: implement. if true, show only if one of the if is true, if false, show only if all of the if are true
53
- },
54
- multiple: true,
55
- },
56
- disciplines: {
57
- type: "Select",
58
- show: {
59
- default: false, // same as hidden = true
60
- switchIf: [{ groups: "fellows" }], // array of conditions to switch the show, each condition will be assessed as a boolean
61
- disjonctive: false, //TODO: implement. if true, show only if one of the if is true, if false, show only if all of the if are true
62
- },
63
- multiple: true,
64
- },
65
- member: {
66
- type: "Select",
67
- show: {
68
- default: false, // same as hidden = true
69
- switchIf: [{ groups: "fellows" }], // array of conditions to switch the show, each condition will be assessed as a boolean
70
- disjonctive: false, //TODO: implement. if true, show only if one of the if is true, if false, show only if all of the if are true
71
- },
72
- multiple: true,
73
- },
74
- },
75
- sort: {
76
- // sort options
77
- nameasc: {
78
- // by name from a to z
79
- icon: "sort-alphabetical-ascending",
80
- text: "by-name-from-a-to-z",
81
- value: ["lastname", 1],
82
- },
83
- namedesc: {
84
- // by name from z to a
85
- icon: "sort-alphabetical-descending",
86
- text: "by-name-from-z-to-a",
87
- value: ["lastname", -1],
88
- },
89
- vintagedesc: {
90
- // by name from z to a
91
- icon: "sort-calendar-descending",
92
- text: "by-vintage-from-old-to-recent",
93
- value: ["groups.vintage.year", 1],
94
- },
95
- vintageasc: {
96
- // by name from z to a
97
- icon: "sort-calendar-descending",
98
- text: "by-vintage-from-recent-to-old",
99
- value: ["groups.vintage.year", -1],
100
- default: true,
101
- },
102
- },
103
- views: {
104
- rows: {
105
- name: "rows",
106
- icon: "view-list",
107
- perPage: {
108
- options: [9, 12, 16],
109
- default: 9,
110
- },
111
- },
112
- dense: {
113
- default: true,
114
- name: "dense",
115
- icon: "land-rows-horizontal",
116
- perPage: {
117
- options: [20, 40, 60, 80, 100],
118
- default: 20,
119
- },
120
- },
121
- /* expanded: {
122
- name: "expanded",
123
- icon: "arrow-expand-vertical",
124
- }, */
125
- },
126
- },
127
- form: {
128
- firstname: {
129
- label: "firstname",
130
- component: "TextField",
131
- type: formType.Primitive,
132
- rules: {
133
- required: true,
134
- min: 1,
135
- max: 200,
136
- },
137
- meta: "firstname", // item type on schema.org
138
- },
139
- lastname: {
140
- label: "lastname",
141
- component: "TextField",
142
- type: formType.Primitive,
143
- rules: {
144
- required: true,
145
- min: 1,
146
- max: 200,
147
- },
148
- meta: "lastname", // item type on schema.org
149
- },
150
- biography: {
151
- label: "biography",
152
- component: "TextArea",
153
- i18n: true,
154
- type: formType.Primitive,
155
- rules: {
156
- required: true,
157
- min: 5,
158
- max: 500,
159
- },
160
- meta: "biography",
161
- transformers: [Transformers.Options],
162
- },
163
- image: {
164
- label: "image",
165
- component: "ImagePicker",
166
- type: formType.Document,
167
- meta: "image",
168
- },
169
- experiences: {
170
- label: "experiences",
171
- component: "CollectionContainerPanel",
172
- type: formType.Array,
173
- items: {
174
- label: "experiences",
175
- component: "ObjectContainerPanel",
176
- type: formType.Template,
177
- meta: "experiences",
178
- },
179
- },
180
-
181
- socials: {
182
- label: "socials",
183
- component: "ObjectKeyPairContainer",
184
- type: formType.Template,
185
- meta: "socials",
186
- },
187
- disciplines: {
188
- label: "disciplines",
189
- component: "DocumentPicker",
190
- type: formType.Document,
191
- meta: "disciplines",
192
- },
193
- video: {
194
- label: "videos",
195
- component: "CollectionContainerPanel",
196
- type: formType.Array,
197
- meta: "video",
198
- items: {
199
- label: "video",
200
- component: "ObjectCollapsiblePanel",
201
- type: formType.Template,
202
- meta: "video",
203
- },
204
- },
205
-
206
- related: {
207
- label: "related",
208
- component: "ObjectContainerPanel",
209
- type: formType.Template,
210
- rules: {
211
- required: true,
212
- min: 5,
213
- max: 200,
214
- },
215
- meta: "related",
216
- },
217
- consent: {
218
- label: "consent",
219
- component: "ObjectContainerPanel",
220
- type: formType.Template,
221
- meta: "consent",
222
- },
223
- groups: {
224
- label: "groups",
225
- groups: [userRole.Admin], // restrict to some groups
226
- component: "ObjectContainerPanel",
227
- type: formType.Template,
228
- meta: "groups",
229
- },
230
- /* lang: {
231
- label: "lang",
232
- component: "Select",
233
- type: formType.Primitive,
234
- rules: {
235
- required: true,
236
- },
237
- // items: langs, // TODO add language enum
238
- meta: "lang",
239
- }, */
240
- },
241
- }
242
-
243
- export default defaultConfig
@@ -1,62 +0,0 @@
1
- import { Form, formType } from "../../form"
2
-
3
- export interface Position {
4
- role: string
5
- department?: string
6
- start?: Date
7
- stop?: Date
8
- }
9
-
10
- export interface PositionForm {
11
- form: Record<string, Form>
12
- }
13
- const defaultConfig: PositionForm = {
14
- form: {
15
- role: {
16
- label: "role",
17
- component: "TextField",
18
- type: formType.Primitive,
19
- rules: {
20
- required: true,
21
- min: 2,
22
- max: 200,
23
- },
24
- meta: "role",
25
- },
26
- department: {
27
- label: "department",
28
- component: "TextField",
29
- type: formType.Primitive,
30
-
31
- rules: {
32
- required: true,
33
- min: 3,
34
- max: 200,
35
- },
36
- meta: "department",
37
- },
38
- start: {
39
- label: "start",
40
- component: "DatePicker",
41
- type: formType.Primitive,
42
-
43
- rules: {
44
- required: true,
45
- date: true,
46
- },
47
- meta: "start",
48
- },
49
- stop: {
50
- label: "stop",
51
- component: "DatePicker",
52
- type: formType.Primitive,
53
- hint: "Leave empty if this is an ongoing position",
54
- rules: {
55
- date: true,
56
- },
57
- meta: "stop",
58
- },
59
- },
60
- }
61
-
62
- export default defaultConfig
@@ -1,9 +0,0 @@
1
- import configPeople, { People } from "./people"
2
- import Model from "../../model"
3
-
4
- export interface Sponsor extends People {}
5
- const defaultConfig: Model = {
6
- aliases: ["people"],
7
- ...configPeople,
8
- }
9
- export default defaultConfig
@@ -1,252 +0,0 @@
1
- import Model from "../../model"
2
- import configPeople, { People } from "./people"
3
- import { formType } from "../../form"
4
-
5
- type Settings = {
6
- lang: String
7
- }
8
- export enum userStatus {
9
- Active = "ACTIVE",
10
- Pending = "PENDING",
11
- Blocked = "BLOCKED",
12
- Deleted = "DELETED",
13
- }
14
- export enum userRole {
15
- Admin = "ADMIN",
16
- Editor = "EDITOR",
17
- Contributor = "CONTRIBUTOR",
18
- Viewer = "VIEWER",
19
- Fellow = "FELLOW",
20
- Member = "MEMBER",
21
- Guest = "GUEST",
22
- }
23
- export interface Users extends People {
24
- admin: Boolean
25
- apps: [AppRole]
26
- email: String
27
- settings: Settings
28
- status: userStatus
29
- }
30
- type AppRole = {
31
- appId: String
32
- roles: userRole[]
33
- }
34
- const userConfig: Model = {
35
- source: "gql",
36
- list: {
37
- create: true, // allow to create new items
38
- filters: {
39
- groups: {
40
- type: "Select",
41
- },
42
- vintage: {
43
- type: "Select",
44
- show: {
45
- default: false, // same as hidden = true
46
- switchIf: [{ groups: "fellows" }], // array of conditions to switch the show, each condition will be assessed as a boolean
47
- disjonctive: false, //TODO: implement. if true, show only if one of the if is true, if false, show only if all of the if are true
48
- },
49
- multiple: true,
50
- },
51
- programs: {
52
- type: "Select",
53
- show: {
54
- default: false, // same as hidden = true
55
- switchIf: [{ groups: "fellows" }], // array of conditions to switch the show, each condition will be assessed as a boolean
56
- disjonctive: false, //TODO: implement. if true, show only if one of the if is true, if false, show only if all of the if are true
57
- },
58
- multiple: true,
59
- },
60
- disciplines: {
61
- type: "Select",
62
- show: {
63
- default: false, // same as hidden = true
64
- switchIf: [{ groups: "fellows" }], // array of conditions to switch the show, each condition will be assessed as a boolean
65
- disjonctive: false, //TODO: implement. if true, show only if one of the if is true, if false, show only if all of the if are true
66
- },
67
- multiple: true,
68
- },
69
- member: {
70
- type: "Select",
71
- show: {
72
- default: false, // same as hidden = true
73
- switchIf: [{ groups: "fellows" }], // array of conditions to switch the show, each condition will be assessed as a boolean
74
- disjonctive: false, //TODO: implement. if true, show only if one of the if is true, if false, show only if all of the if are true
75
- },
76
- multiple: true,
77
- },
78
- },
79
- sort: {
80
- // sort options
81
- nameasc: {
82
- // by name from a to z
83
- icon: "sort-alphabetical-ascending",
84
- text: "by-name-from-a-to-z",
85
- value: ["lastname", 1],
86
- },
87
- namedesc: {
88
- // by name from z to a
89
- icon: "sort-alphabetical-descending",
90
- text: "by-name-from-z-to-a",
91
- value: ["lastname", -1],
92
- },
93
- vintagedesc: {
94
- // by name from z to a
95
- icon: "sort-calendar-descending",
96
- text: "by-vintage-from-old-to-recent",
97
- value: ["groups.vintage.year", -1],
98
- },
99
- vintageasc: {
100
- // by name from z to a
101
- icon: "sort-calendar-descending",
102
- text: "by-vintage-from-recent-to-old",
103
- value: ["groups.vintage.year", 1],
104
- default: true,
105
- },
106
- },
107
- views: {
108
- rows: {
109
- name: "rows",
110
- icon: "view-list",
111
- perPage: {
112
- options: [9, 12, 16],
113
- default: 9,
114
- },
115
- },
116
- dense: {
117
- default: true,
118
- name: "dense",
119
- icon: "land-rows-horizontal",
120
- perPage: {
121
- options: [20, 40, 60, 80, 100],
122
- default: 20,
123
- },
124
- },
125
- /* expanded: {
126
- name: "expanded",
127
- icon: "arrow-expand-vertical",
128
- }, */
129
- },
130
- },
131
- form: {
132
- firstname: {
133
- label: "firstname",
134
- component: "TextField",
135
- type: formType.Primitive,
136
-
137
- rules: {
138
- required: true,
139
- min: 1,
140
- max: 200,
141
- },
142
- meta: "firstname", // item type on schema.org
143
- },
144
- lastname: {
145
- label: "lastname",
146
- component: "TextField",
147
- type: formType.Primitive,
148
-
149
- rules: {
150
- required: true,
151
- min: 1,
152
- max: 200,
153
- },
154
- meta: "lastname", // item type on schema.org
155
- },
156
- affiliations: {
157
- label: "affiliations",
158
- component: "AffiliationPicker",
159
- type: formType.Document,
160
-
161
- meta: "affiliations",
162
- },
163
- image: {
164
- label: "image",
165
- component: "ImagePicker",
166
- type: formType.Document,
167
-
168
- meta: "image",
169
- },
170
- socials: {
171
- label: "socials",
172
- component: "ObjectContainerPanel",
173
- type: formType.Template,
174
- meta: "socials",
175
- },
176
- disciplines: {
177
- label: "disciplines",
178
- component: "DisciplinePicker",
179
- type: formType.Document,
180
- meta: "disciplines",
181
- },
182
- video: {
183
- label: "video",
184
- component: "CollectionContainerPanel",
185
- type: formType.Array,
186
- meta: "video",
187
- items: {
188
- label: "video",
189
- component: "ObjectContainerPanel",
190
- type: formType.Template,
191
- meta: "video",
192
- },
193
- },
194
- biography: {
195
- label: "biography",
196
- component: "TextArea",
197
- i18n: true,
198
- type: formType.Primitive,
199
- rules: {
200
- required: true,
201
- min: 5,
202
- max: 2000,
203
- },
204
- meta: "biography",
205
- },
206
- related: {
207
- label: "related",
208
- component: "ObjectContainerPanel",
209
- type: formType.Template,
210
- rules: {
211
- required: true,
212
- min: 5,
213
- max: 200,
214
- },
215
- meta: "related",
216
- },
217
- consent: {
218
- label: "consent",
219
- component: "ObjectContainerPanel",
220
- type: formType.Template,
221
- rules: {
222
- required: true,
223
- },
224
- meta: "consent",
225
- },
226
- groups: {
227
- label: "groups",
228
- component: "ObjectContainerPanel",
229
- type: formType.Template,
230
- rules: {
231
- required: true,
232
- },
233
- // items: Groups // TODO: make groups enum
234
- meta: "groups",
235
- },
236
- lang: {
237
- label: "lang",
238
- component: "AutoComplete",
239
- type: formType.Primitive,
240
- rules: {
241
- required: true,
242
- },
243
- meta: "lang",
244
- },
245
- },
246
- }
247
- const defaultConfig: Model = {
248
- aliases: ["people"],
249
- ...configPeople,
250
- ...userConfig,
251
- }
252
- export default defaultConfig
@@ -1,124 +0,0 @@
1
- import { formType } from "../../form"
2
- import Model from "../../model"
3
-
4
- export interface Vintage {
5
- name: string
6
- year: number
7
- theme?: string
8
- url?: URL
9
- }
10
-
11
- const defaultConfig: Model = {
12
- list: {
13
- create: true, // allow to create new items
14
- filters: {
15
- year: {
16
- type: "Select",
17
- },
18
- },
19
- sort: {
20
- // sort options
21
- nameasc: {
22
- // by name from a to z
23
- icon: "sort-alphabetical-ascending",
24
- text: "by-name-from-a-to-z",
25
- value: ["article_title", 1],
26
- },
27
- namedesc: {
28
- // by name from z to a
29
- icon: "sort-alphabetical-descending",
30
- text: "by-name-from-z-to-a",
31
- value: ["article_title", -1],
32
- },
33
- dateasc: {
34
- // by date from most recent to oldest
35
- icon: "sort-calendar-descending",
36
- text: "by-date-most-recent-first",
37
- value: ["date", -1],
38
- default: true,
39
- },
40
- datedesc: {
41
- // by date from oldest to most recent
42
- icon: "sort-calendar-ascending",
43
- text: "by-date-oldest-first",
44
- value: ["date", 1],
45
- },
46
- },
47
- views: {
48
- rows: {
49
- name: "rows",
50
- icon: "view-list",
51
- perPage: {
52
- options: [9, 12, 16],
53
- default: 9,
54
- },
55
- },
56
- dense: {
57
- default: true,
58
- name: "dense",
59
- icon: "land-rows-horizontal",
60
- perPage: {
61
- options: [20, 40, 60, 80, 100],
62
- default: 20,
63
- },
64
- },
65
- tiles: {
66
- name: "tiles",
67
- icon: "view-quilt",
68
- },
69
- grid: {
70
- name: "grid",
71
- icon: "view-day",
72
- },
73
- },
74
- },
75
- form: {
76
- name: {
77
- label: "name",
78
- type: formType.Primitive,
79
- component: "TextField",
80
- rules: {
81
- required: true,
82
- min: 2,
83
- max: 100,
84
- },
85
- meta: "name", // item type on schema.org
86
- },
87
- year: {
88
- label: "year",
89
- type: formType.Primitive,
90
- component: "TextField",
91
- rules: {
92
- required: true,
93
- min: 2,
94
- max: 100,
95
- },
96
- meta: "year",
97
- },
98
- theme: {
99
- label: "theme",
100
- type: formType.Primitive,
101
- component: "TextField",
102
- i18n: true,
103
- rules: {
104
- required: true,
105
- min: 2,
106
- max: 100,
107
- },
108
- meta: "theme",
109
- },
110
- url: {
111
- type: formType.Primitive,
112
- component: "TextField",
113
- label: "url",
114
- rules: {
115
- required: true,
116
- url: true,
117
- max: 2048,
118
- },
119
- meta: "url", // item type on schema.org
120
- },
121
- },
122
- }
123
-
124
- export default defaultConfig