@data-fair/app-dashboards 0.4.2 → 0.5.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.
@@ -116,7 +116,7 @@
116
116
  "items": {
117
117
  "type": "object",
118
118
  "properties": {
119
- "title": { "type": "string" },
119
+ "title": { "type": "string", "title": "Libellé" },
120
120
  "icon": {
121
121
  "title": "Icône",
122
122
  "description": "Il est possible de consulter plus facilement la liste des icones disponibles sur <a href=\"https://materialdesignicons.com\" target=\"_blank\">ce site</a>.",
@@ -135,162 +135,202 @@
135
135
  }
136
136
  }
137
137
  },
138
- "description": { "type": "string", "x-display": "textarea" },
139
- "height": {
140
- "title": "Hauteur (px)",
141
- "description": "Mettez une valeur négative pour un redimensionnement automatique",
142
- "type": "integer",
143
- "default": 400
144
- },
145
- "elements": {
146
- "title": "Éléments",
138
+ "rows": {
139
+ "title": "Lignes",
147
140
  "type": "array",
148
- "items": {
141
+ "items":{
149
142
  "type": "object",
150
143
  "properties":{
151
- "title": { "type": "string", "title": "Titre" },
152
- "width": {
153
- "title": "Largeur",
154
- "type": "string",
155
- "oneOf": [{
156
- "const": "small",
157
- "title": "Fin"
158
- },
159
- {
160
- "const": "medium",
161
- "title": "Moyen"
162
- },
163
- {
164
- "const": "large",
165
- "title": "Large"
166
- },
167
- {
168
- "const": "full",
169
- "title": "Toute la largeur"
170
- }
171
- ],
172
- "default": "medium"
173
- }
174
- },
175
- "oneOf": [{
176
- "title": "Prévisualisation table",
177
- "properties": {
178
- "type": { "const": "tablePreview", "title": "Type de l'élément" },
179
- "concepts": {
180
- "type": "array",
181
- "x-fromUrl": "{datasets.0.href}/schema?calculated=false&separator=false&concept=true",
182
- "x-itemKey": "key",
183
- "x-itemTitle": "label",
184
- "items": {
185
- "title": "Colonne du filtre commun",
186
- "type": "object",
187
- "properties": {
188
- "key": {"type": "string"},
189
- "label": {"type": "string"},
190
- "x-concept": {"type": "object"}
191
- }
192
- }
193
- },
194
- "valueMandatory": {
195
- "title": "Nécessite une valeur dans le filtre",
196
- "type": "boolean",
197
- "default": true
198
- },
199
- "dataset": {
144
+ "height": {
145
+ "title": "Hauteur (px)",
146
+ "description": "Mettez une valeur négative pour un redimensionnement automatique",
147
+ "type": "integer",
148
+ "default": 400
149
+ },
150
+ "elements": {
151
+ "title": "Éléments",
152
+ "type": "array",
153
+ "items": {
200
154
  "type": "object",
201
- "x-fromUrl": "api/v1/datasets?q={q}&{context.datasetFilter}&select=id,title",
202
- "x-itemKey": "id",
203
- "x-itemTitle": "title",
204
- "x-itemsProp": "results",
205
- "properties": {
206
- "id": {"type": "string"},
207
- "title": {"type": "string"},
208
- "href": {"type": "string"}
209
- }
210
- },
211
- "display": {
212
- "type": "string",
213
- "oneOf": [{
214
- "const": "table",
215
- "title": "Tableau"
216
- },
217
- {
218
- "const": "table-dense",
219
- "title": "Tableau dense"
220
- },
155
+ "properties":{
156
+ "title": { "type": "string", "title": "Titre" },
157
+ "width": {
158
+ "title": "Largeur",
159
+ "type": "integer",
160
+ "oneOf": [{
161
+ "const": 1,
162
+ "title": "Fin"
163
+ },
164
+ {
165
+ "const": 2,
166
+ "title": "Moyen"
167
+ },
168
+ {
169
+ "const": 3,
170
+ "title": "Large"
171
+ }
172
+ ],
173
+ "default": 2
174
+ }
175
+ },
176
+ "oneOf": [
221
177
  {
222
- "const": "list",
223
- "title": "Vignettes"
178
+ "$ref": "#/definitions/table"
179
+ },{
180
+ "$ref": "#/definitions/application"
181
+ },{
182
+ "$ref": "#/definitions/text"
183
+ },{
184
+ "$ref": "#/definitions/column"
224
185
  }
225
- ],
226
- "default": "table",
227
- "title": "Affichage"
228
- },
229
- "noInteractions": {
230
- "title": "Désactiver les interactions",
231
- "type": "boolean",
232
- "default": false
233
- },
234
- "fields": {
235
- "title": "Champs à afficher",
236
- "description": "Si vide, tous les champs seront affichés",
237
- "type": "array",
238
- "x-fromUrl": "{parent.value.dataset.href}/schema?calculated=false",
239
- "x-itemTitle": "label",
240
- "x-itemKey": "key",
241
- "items": {
242
- "type": "string"
243
- }
186
+ ]
244
187
  }
245
188
  }
246
- }, {
247
- "title": "Visualisation",
248
- "properties": {
249
- "type": { "const": "application", "title": "Type de l'élément" },
250
- "concepts": {
251
- "type": "array",
252
- "x-fromUrl": "{datasets.0.href}/schema?calculated=false&separator=false&concept=true",
253
- "x-itemKey": "key",
254
- "x-itemTitle": "label",
255
- "items": {
256
- "title": "Colonne du filtre commun",
257
- "type": "object",
258
- "properties": {
259
- "key": {"type": "string"},
260
- "label": {"type": "string"},
261
- "x-concept": {"type": "object"}
262
- }
263
- }
264
- },
265
- "valueMandatory": {
266
- "title": "Nécessite une valeur dans le filtre",
267
- "type": "boolean",
268
- "default": true
269
- },
270
- "application": {
271
- "type": "object",
272
- "x-fromUrl": "api/v1/applications?q={q}&{context.datasetFilter}&filterConcepts=true&select=id,title,baseApp",
273
- "x-itemKey": "id",
274
- "x-itemTitle": "title",
275
- "x-itemsProp": "results",
276
- "properties": {
277
- "id": {"type": "string"},
278
- "title": {"type": "string"},
279
- "baseApp":{"type": "object"}
280
- }
281
- }
282
- }
283
- }, {
284
- "title": "Texte",
285
- "properties": {
286
- "type": { "const": "text", "title": "Type de l'élément" },
287
- "content": { "type": "string", "x-display": "textarea", "title": "Contenu" }
288
- }
289
- }]
189
+ }
290
190
  }
291
191
  }
292
192
  }
293
193
  }
294
194
  }
195
+ },
196
+ "definitions":{
197
+ "table": {
198
+ "title": "Prévisualisation table",
199
+ "properties": {
200
+ "type": { "const": "tablePreview", "title": "Type de l'élément" },
201
+ "concepts": {
202
+ "type": "array",
203
+ "x-fromUrl": "{datasets.0.href}/schema?calculated=false&separator=false&concept=true",
204
+ "x-itemKey": "key",
205
+ "x-itemTitle": "label",
206
+ "items": {
207
+ "title": "Colonne du filtre commun",
208
+ "type": "object",
209
+ "properties": {
210
+ "key": {"type": "string"},
211
+ "label": {"type": "string"},
212
+ "x-concept": {"type": "object"}
213
+ }
214
+ }
215
+ },
216
+ "valueMandatory": {
217
+ "title": "Nécessite une valeur dans le filtre",
218
+ "type": "boolean",
219
+ "default": false
220
+ },
221
+ "dataset": {
222
+ "type": "object",
223
+ "x-fromUrl": "api/v1/datasets?q={q}&{context.datasetFilter}&select=id,title",
224
+ "x-itemKey": "id",
225
+ "x-itemTitle": "title",
226
+ "x-itemsProp": "results",
227
+ "properties": {
228
+ "id": {"type": "string"},
229
+ "title": {"type": "string"},
230
+ "href": {"type": "string"}
231
+ }
232
+ },
233
+ "display": {
234
+ "type": "string",
235
+ "oneOf": [{
236
+ "const": "table",
237
+ "title": "Tableau"
238
+ },
239
+ {
240
+ "const": "table-dense",
241
+ "title": "Tableau dense"
242
+ },
243
+ {
244
+ "const": "list",
245
+ "title": "Vignettes"
246
+ }
247
+ ],
248
+ "default": "table",
249
+ "title": "Affichage"
250
+ },
251
+ "noInteractions": {
252
+ "title": "Désactiver les interactions",
253
+ "type": "boolean",
254
+ "default": false
255
+ },
256
+ "fields": {
257
+ "title": "Champs à afficher",
258
+ "description": "Si vide, tous les champs seront affichés",
259
+ "type": "array",
260
+ "x-fromUrl": "{parent.value.dataset.href}/schema?calculated=false",
261
+ "x-itemTitle": "label",
262
+ "x-itemKey": "key",
263
+ "items": {
264
+ "type": "string"
265
+ }
266
+ }
267
+ }
268
+ },
269
+ "application":{
270
+ "title": "Visualisation",
271
+ "properties": {
272
+ "type": { "const": "application", "title": "Type de l'élément" },
273
+ "concepts": {
274
+ "type": "array",
275
+ "x-fromUrl": "{datasets.0.href}/schema?calculated=false&separator=false&concept=true",
276
+ "x-itemKey": "key",
277
+ "x-itemTitle": "label",
278
+ "items": {
279
+ "title": "Colonne du filtre commun",
280
+ "type": "object",
281
+ "properties": {
282
+ "key": {"type": "string"},
283
+ "label": {"type": "string"},
284
+ "x-concept": {"type": "object"}
285
+ }
286
+ }
287
+ },
288
+ "valueMandatory": {
289
+ "title": "Nécessite une valeur dans le filtre",
290
+ "type": "boolean",
291
+ "default": false
292
+ },
293
+ "application": {
294
+ "type": "object",
295
+ "x-fromUrl": "api/v1/applications?q={q}&{context.datasetFilter}&filterConcepts=true&select=id,title,baseApp",
296
+ "x-itemKey": "id",
297
+ "x-itemTitle": "title",
298
+ "x-itemsProp": "results",
299
+ "properties": {
300
+ "id": {"type": "string"},
301
+ "title": {"type": "string"},
302
+ "baseApp":{"type": "object"}
303
+ }
304
+ }
305
+ }
306
+ },
307
+ "text": {
308
+ "title": "Texte",
309
+ "properties": {
310
+ "type": { "const": "text", "title": "Type de l'élément" },
311
+ "content": { "type": "string", "x-display": "textarea", "title": "Contenu" }
312
+ }
313
+ },
314
+ "column": {
315
+ "title": "Colonne",
316
+ "properties":{
317
+ "type": { "const": "column", "title": "Type de l'élément" },
318
+ "elements":{
319
+ "type":"array",
320
+ "items": {
321
+ "type": "object",
322
+ "oneOf": [
323
+ {
324
+ "$ref": "#/definitions/table"
325
+ },{
326
+ "$ref": "#/definitions/application"
327
+ },{
328
+ "$ref": "#/definitions/text"
329
+ }
330
+ ]
331
+ }
332
+ }
333
+ }
334
+ }
295
335
  }
296
336
  }
package/dist/index.html CHANGED
@@ -20,8 +20,8 @@
20
20
 
21
21
  <!-- Capture a global variable defined by data-fair's reverse proxy. -->
22
22
  <script type="text/javascript">window.APPLICATION=%APPLICATION%;</script>
23
- <script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/@data-fair/app-dashboards@0.4.2/dist/assets/index-d44b6f42.js"></script>
24
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@data-fair/app-dashboards@0.4.2/dist/assets/index-4e112434.css">
23
+ <script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/@data-fair/app-dashboards@0.5.1/dist/assets/index-19cb11c6.js"></script>
24
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@data-fair/app-dashboards@0.5.1/dist/assets/index-4e112434.css">
25
25
  </head>
26
26
 
27
27
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@data-fair/app-dashboards",
3
- "version": "0.4.2",
3
+ "version": "0.5.1",
4
4
  "scripts": {
5
5
  "dev": "APP_URL=http://localhost:3000/app/ df-dev-server",
6
6
  "dev-src": "vite",