@data-fair/app-dashboards 0.8.0 → 0.9.0
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.
- package/README.md +1 -1
- package/dist/assets/index-BqAKStUw.js +27 -0
- package/dist/assets/index-Do9TUKv3.css +5 -0
- package/dist/config-schema.json +286 -76
- package/dist/index.html +5 -5
- package/package.json +5 -3
- package/dist/assets/index-CaUwrmsK.css +0 -5
- package/dist/assets/index-D6Xn0HDe.js +0 -27
package/dist/config-schema.json
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
{
|
8
8
|
"title": "Source des valeurs pour les filtres",
|
9
9
|
"type": "object",
|
10
|
-
"x-fromUrl": "api/v1/datasets?status=finalized&q={q}&select=id,title,schema,timePeriod,bbox&
|
10
|
+
"x-fromUrl": "api/v1/datasets?status=finalized&q={q}&select=id,title,schema,timePeriod,bbox&{context.datasetFilter}&sort=createdAt:-1",
|
11
11
|
"x-itemsProp": "results",
|
12
12
|
"x-itemTitle": "title",
|
13
13
|
"x-itemKey": "href",
|
@@ -37,9 +37,12 @@
|
|
37
37
|
}
|
38
38
|
]
|
39
39
|
},
|
40
|
+
"staticFilters": {
|
41
|
+
"$ref": "#/definitions/filters"
|
42
|
+
},
|
40
43
|
"filters": {
|
41
44
|
"type": "array",
|
42
|
-
"title": "Filtres du tableau de bord",
|
45
|
+
"title": "Filtres dynamiques du tableau de bord",
|
43
46
|
"items": {
|
44
47
|
"type": "object",
|
45
48
|
"required": ["labelField"],
|
@@ -138,10 +141,9 @@
|
|
138
141
|
"properties": {
|
139
142
|
"title": { "type": "string", "title": "Libellé" },
|
140
143
|
"icon": {
|
141
|
-
"title": "Icône",
|
142
|
-
"description": "Il est possible de consulter plus facilement la liste des icones disponibles sur <a href=\"https://materialdesignicons.com\" target=\"_blank\">ce site</a>.",
|
143
144
|
"type": "object",
|
144
|
-
"
|
145
|
+
"title": "Icone",
|
146
|
+
"x-fromUrl": "https://koumoul.com/data-fair/api/v1/datasets/icons-mdi-latest/lines?q={q}",
|
145
147
|
"x-itemKey": "name",
|
146
148
|
"x-itemTitle": "name",
|
147
149
|
"x-itemIcon": "svg",
|
@@ -152,6 +154,9 @@
|
|
152
154
|
},
|
153
155
|
"svg": {
|
154
156
|
"type": "string"
|
157
|
+
},
|
158
|
+
"svgPath": {
|
159
|
+
"type": "string"
|
155
160
|
}
|
156
161
|
}
|
157
162
|
},
|
@@ -220,95 +225,232 @@
|
|
220
225
|
"definitions": {
|
221
226
|
"table": {
|
222
227
|
"title": "Prévisualisation table",
|
228
|
+
"type": "object",
|
223
229
|
"properties": {
|
224
|
-
"type": { "const": "tablePreview", "title": "Type de l'élément" }
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
"
|
229
|
-
"x-itemTitle": "title",
|
230
|
-
"x-itemsProp": "results",
|
230
|
+
"type": { "const": "tablePreview", "title": "Type de l'élément" }
|
231
|
+
},
|
232
|
+
"oneOf": [
|
233
|
+
{
|
234
|
+
"title": "Jeu de données des filtres",
|
231
235
|
"properties": {
|
232
|
-
"
|
233
|
-
|
234
|
-
|
235
|
-
"schema": { "type": "array" }
|
236
|
-
}
|
237
|
-
},
|
238
|
-
"display": {
|
239
|
-
"type": "string",
|
240
|
-
"oneOf": [
|
241
|
-
{
|
242
|
-
"const": "table",
|
243
|
-
"title": "Tableau"
|
236
|
+
"source": {
|
237
|
+
"const": "root",
|
238
|
+
"title": "Source des données"
|
244
239
|
},
|
245
|
-
{
|
246
|
-
"
|
247
|
-
"
|
240
|
+
"fields": {
|
241
|
+
"title": "Champs à afficher",
|
242
|
+
"description": "Si vide, tous les champs seront affichés",
|
243
|
+
"type": "array",
|
244
|
+
"x-fromUrl": "{datasets[0].href}/schema?calculated=false",
|
245
|
+
"x-itemTitle": "label",
|
246
|
+
"x-itemKey": "key",
|
247
|
+
"items": {
|
248
|
+
"type": "string"
|
249
|
+
}
|
248
250
|
},
|
249
|
-
{
|
250
|
-
"
|
251
|
-
"
|
251
|
+
"display": {
|
252
|
+
"type": "string",
|
253
|
+
"oneOf": [
|
254
|
+
{
|
255
|
+
"const": "table",
|
256
|
+
"title": "Tableau"
|
257
|
+
},
|
258
|
+
{
|
259
|
+
"const": "table-dense",
|
260
|
+
"title": "Tableau dense"
|
261
|
+
},
|
262
|
+
{
|
263
|
+
"const": "list",
|
264
|
+
"title": "Vignettes"
|
265
|
+
}
|
266
|
+
],
|
267
|
+
"default": "table",
|
268
|
+
"title": "Affichage"
|
269
|
+
},
|
270
|
+
"noInteractions": {
|
271
|
+
"title": "Désactiver les interactions",
|
272
|
+
"type": "boolean",
|
273
|
+
"default": false
|
274
|
+
},
|
275
|
+
"valueMandatory": {
|
276
|
+
"title": "Nécessite une valeur dans des filtres",
|
277
|
+
"type": "boolean",
|
278
|
+
"default": false
|
279
|
+
},
|
280
|
+
"mandatoryFilters": {
|
281
|
+
"title": "Filtres requis",
|
282
|
+
"type": "array",
|
283
|
+
"x-if": "parent.value.valueMandatory",
|
284
|
+
"x-fromData": "filters",
|
285
|
+
"x-itemKey": "labelField",
|
286
|
+
"x-itemTitle": "labelField",
|
287
|
+
"items": {
|
288
|
+
"type": "string"
|
289
|
+
}
|
252
290
|
}
|
253
|
-
],
|
254
|
-
"default": "table",
|
255
|
-
"title": "Affichage"
|
256
|
-
},
|
257
|
-
"noInteractions": {
|
258
|
-
"title": "Désactiver les interactions",
|
259
|
-
"type": "boolean",
|
260
|
-
"default": false
|
261
|
-
},
|
262
|
-
"fields": {
|
263
|
-
"title": "Champs à afficher",
|
264
|
-
"description": "Si vide, tous les champs seront affichés",
|
265
|
-
"type": "array",
|
266
|
-
"x-fromUrl": "{parent.value.dataset.href}/schema?calculated=false",
|
267
|
-
"x-itemTitle": "label",
|
268
|
-
"x-itemKey": "key",
|
269
|
-
"items": {
|
270
|
-
"type": "string"
|
271
291
|
}
|
272
292
|
},
|
273
|
-
|
274
|
-
"title": "
|
275
|
-
"
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
293
|
+
{
|
294
|
+
"title": "Autre jeu de données",
|
295
|
+
"properties": {
|
296
|
+
"source": {
|
297
|
+
"const": "external",
|
298
|
+
"title": "Source des données"
|
299
|
+
},
|
300
|
+
"dataset": {
|
301
|
+
"type": "object",
|
302
|
+
"x-fromUrl": "api/v1/datasets?q={q}&{context.datasetFilter}&select=id,title,schema&sort=createdAt:-1",
|
303
|
+
"x-itemKey": "id",
|
304
|
+
"x-itemTitle": "title",
|
305
|
+
"x-itemsProp": "results",
|
306
|
+
"properties": {
|
307
|
+
"id": { "type": "string" },
|
308
|
+
"title": { "type": "string" },
|
309
|
+
"href": { "type": "string" },
|
310
|
+
"schema": { "type": "array" }
|
311
|
+
}
|
312
|
+
},
|
313
|
+
"fields": {
|
314
|
+
"title": "Champs à afficher",
|
315
|
+
"description": "Si vide, tous les champs seront affichés",
|
316
|
+
"type": "array",
|
317
|
+
"x-fromUrl": "{parent.value.dataset.href}/schema?calculated=false",
|
318
|
+
"x-itemTitle": "label",
|
319
|
+
"x-itemKey": "key",
|
320
|
+
"items": {
|
321
|
+
"type": "string"
|
322
|
+
}
|
323
|
+
},
|
324
|
+
"display": {
|
325
|
+
"type": "string",
|
326
|
+
"oneOf": [
|
327
|
+
{
|
328
|
+
"const": "table",
|
329
|
+
"title": "Tableau"
|
330
|
+
},
|
331
|
+
{
|
332
|
+
"const": "table-dense",
|
333
|
+
"title": "Tableau dense"
|
334
|
+
},
|
335
|
+
{
|
336
|
+
"const": "list",
|
337
|
+
"title": "Vignettes"
|
338
|
+
}
|
339
|
+
],
|
340
|
+
"default": "table",
|
341
|
+
"title": "Affichage"
|
342
|
+
},
|
343
|
+
"noInteractions": {
|
344
|
+
"title": "Désactiver les interactions",
|
345
|
+
"type": "boolean",
|
346
|
+
"default": false
|
347
|
+
},
|
348
|
+
"valueMandatory": {
|
349
|
+
"title": "Nécessite une valeur dans des filtres",
|
350
|
+
"type": "boolean",
|
351
|
+
"default": false
|
352
|
+
},
|
353
|
+
"mandatoryFilters": {
|
354
|
+
"title": "Filtres requis",
|
355
|
+
"type": "array",
|
356
|
+
"x-if": "parent.value.valueMandatory",
|
357
|
+
"x-fromData": "filters",
|
358
|
+
"x-itemKey": "labelField",
|
359
|
+
"x-itemTitle": "labelField",
|
360
|
+
"items": {
|
361
|
+
"type": "string"
|
362
|
+
}
|
363
|
+
}
|
287
364
|
}
|
288
365
|
}
|
366
|
+
],
|
367
|
+
"default": {
|
368
|
+
"source": "root"
|
289
369
|
}
|
290
370
|
},
|
291
371
|
"application": {
|
292
372
|
"title": "Visualisation",
|
293
373
|
"properties": {
|
294
|
-
"type": { "const": "application", "title": "Type de l'élément" }
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
"
|
299
|
-
"x-itemTitle": "title",
|
300
|
-
"x-itemsProp": "results",
|
374
|
+
"type": { "const": "application", "title": "Type de l'élément" }
|
375
|
+
},
|
376
|
+
"oneOf": [
|
377
|
+
{
|
378
|
+
"title": "Jeu de données des filtres",
|
301
379
|
"properties": {
|
302
|
-
"
|
303
|
-
|
304
|
-
|
380
|
+
"source": {
|
381
|
+
"const": "root",
|
382
|
+
"title": "Source des données de l'application"
|
383
|
+
},
|
384
|
+
"application": {
|
385
|
+
"type": "object",
|
386
|
+
"x-fromUrl": "api/v1/applications?q={q}&{context.datasetFilter}&dataset={datasets[0].id}&filterConcepts=true&select=id,title,baseApp&sort=createdAt:-1",
|
387
|
+
"x-itemKey": "id",
|
388
|
+
"x-itemTitle": "title",
|
389
|
+
"x-itemsProp": "results",
|
390
|
+
"properties": {
|
391
|
+
"id": { "type": "string" },
|
392
|
+
"title": { "type": "string" },
|
393
|
+
"baseApp": { "type": "object" }
|
394
|
+
}
|
395
|
+
},
|
396
|
+
"valueMandatory": {
|
397
|
+
"title": "Nécessite une valeur dans des filtres",
|
398
|
+
"type": "boolean",
|
399
|
+
"default": false
|
400
|
+
},
|
401
|
+
"mandatoryFilters": {
|
402
|
+
"title": "Filtres requis",
|
403
|
+
"type": "array",
|
404
|
+
"x-if": "parent.value.valueMandatory",
|
405
|
+
"x-fromData": "filters",
|
406
|
+
"x-itemKey": "labelField",
|
407
|
+
"x-itemTitle": "labelField",
|
408
|
+
"items": {
|
409
|
+
"type": "string"
|
410
|
+
}
|
411
|
+
}
|
305
412
|
}
|
306
413
|
},
|
307
|
-
|
308
|
-
"title": "
|
309
|
-
"
|
310
|
-
|
414
|
+
{
|
415
|
+
"title": "Autre jeu de données",
|
416
|
+
"properties": {
|
417
|
+
"source": {
|
418
|
+
"const": "external",
|
419
|
+
"title": "Source des données de l'application"
|
420
|
+
},
|
421
|
+
"application": {
|
422
|
+
"type": "object",
|
423
|
+
"x-fromUrl": "api/v1/applications?q={q}&{context.datasetFilter}&filterConcepts=true&select=id,title,baseApp&sort=createdAt:-1",
|
424
|
+
"x-itemKey": "id",
|
425
|
+
"x-itemTitle": "title",
|
426
|
+
"x-itemsProp": "results",
|
427
|
+
"properties": {
|
428
|
+
"id": { "type": "string" },
|
429
|
+
"title": { "type": "string" },
|
430
|
+
"baseApp": { "type": "object" }
|
431
|
+
}
|
432
|
+
},
|
433
|
+
"valueMandatory": {
|
434
|
+
"title": "Nécessite une valeur dans des filtres",
|
435
|
+
"type": "boolean",
|
436
|
+
"default": false
|
437
|
+
},
|
438
|
+
"mandatoryFilters": {
|
439
|
+
"title": "Filtres requis",
|
440
|
+
"type": "array",
|
441
|
+
"x-if": "parent.value.valueMandatory",
|
442
|
+
"x-fromData": "filters",
|
443
|
+
"x-itemKey": "labelField",
|
444
|
+
"x-itemTitle": "labelField",
|
445
|
+
"items": {
|
446
|
+
"type": "string"
|
447
|
+
}
|
448
|
+
}
|
449
|
+
}
|
311
450
|
}
|
451
|
+
],
|
452
|
+
"default": {
|
453
|
+
"source": "root"
|
312
454
|
}
|
313
455
|
},
|
314
456
|
"text": {
|
@@ -344,6 +486,74 @@
|
|
344
486
|
}
|
345
487
|
}
|
346
488
|
}
|
489
|
+
},
|
490
|
+
"filters": {
|
491
|
+
"title": "Filtres prédéfinis",
|
492
|
+
"type": "array",
|
493
|
+
"items": {
|
494
|
+
"type": "object",
|
495
|
+
"default": {
|
496
|
+
"type": "in"
|
497
|
+
},
|
498
|
+
"required": ["type"],
|
499
|
+
"oneOf": [
|
500
|
+
{
|
501
|
+
"title": "Restreindre à des valeurs",
|
502
|
+
"required": ["field"],
|
503
|
+
"properties": {
|
504
|
+
"type": {
|
505
|
+
"const": "in"
|
506
|
+
},
|
507
|
+
"field": {
|
508
|
+
"$ref": "#/definitions/filterField"
|
509
|
+
},
|
510
|
+
"values": {
|
511
|
+
"type": "array",
|
512
|
+
"title": "Valeurs",
|
513
|
+
"items": {
|
514
|
+
"type": "string"
|
515
|
+
},
|
516
|
+
"x-fromUrl": "{datasets.0.href}/values/{parent.value.field}?q={q}&q_mode=complete&size=100&stringify=true"
|
517
|
+
}
|
518
|
+
}
|
519
|
+
},
|
520
|
+
{
|
521
|
+
"title": "Restreindre à un interval de valeurs",
|
522
|
+
"required": ["field"],
|
523
|
+
"properties": {
|
524
|
+
"type": {
|
525
|
+
"const": "interval"
|
526
|
+
},
|
527
|
+
"field": {
|
528
|
+
"$ref": "#/definitions/filterField"
|
529
|
+
},
|
530
|
+
"minValue": {
|
531
|
+
"type": "string",
|
532
|
+
"title": "Valeur min",
|
533
|
+
"x-fromUrl": "{datasets.0.href}/values_agg?field={parent.value.field}&sort={parent.value.field}&{parent.value.field}_gte={q}&stringify=true",
|
534
|
+
"x-itemsProp": "aggs",
|
535
|
+
"x-itemTitle": "value",
|
536
|
+
"x-itemKey": "value"
|
537
|
+
},
|
538
|
+
"maxValue": {
|
539
|
+
"type": "string",
|
540
|
+
"title": "Valeur max",
|
541
|
+
"x-fromUrl": "{datasets.0.href}/values_agg?field={parent.value.field}&sort=-{parent.value.field}&{parent.value.field}_lte={q}&stringify=true",
|
542
|
+
"x-itemsProp": "aggs",
|
543
|
+
"x-itemTitle": "value",
|
544
|
+
"x-itemKey": "value"
|
545
|
+
}
|
546
|
+
}
|
547
|
+
}
|
548
|
+
]
|
549
|
+
}
|
550
|
+
},
|
551
|
+
"filterField": {
|
552
|
+
"type": "string",
|
553
|
+
"title": "Colonne de filtre",
|
554
|
+
"x-fromUrl": "{datasets.0.href}/schema?calculated=false",
|
555
|
+
"x-itemTitle": "label",
|
556
|
+
"x-itemKey": "key"
|
347
557
|
}
|
348
558
|
}
|
349
559
|
}
|
package/dist/index.html
CHANGED
@@ -2,6 +2,9 @@
|
|
2
2
|
<html lang="en">
|
3
3
|
|
4
4
|
<head>
|
5
|
+
<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin="anonymous">
|
6
|
+
<link rel="preload" as="style" onload="this.rel='stylesheet'" href="https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap">
|
7
|
+
|
5
8
|
<meta charset="UTF-8" />
|
6
9
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
7
10
|
<meta name="x-capture" content="trigger" />
|
@@ -15,13 +18,10 @@
|
|
15
18
|
|
16
19
|
<title lang="fr">Dashboards</title>
|
17
20
|
|
18
|
-
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nunito:300,400,500,700,400italic" />
|
19
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@5.x/css/materialdesignicons.min.css" />
|
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.
|
24
|
-
<link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/npm/@data-fair/app-dashboards@0.
|
23
|
+
<script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/@data-fair/app-dashboards@0.9.0/dist/assets/index-BqAKStUw.js"></script>
|
24
|
+
<link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/npm/@data-fair/app-dashboards@0.9.0/dist/assets/index-Do9TUKv3.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.
|
3
|
+
"version": "0.9.0",
|
4
4
|
"scripts": {
|
5
5
|
"dev": "APP_URL=http://localhost:3000/app/ df-dev-server",
|
6
6
|
"dev-src": "vite",
|
@@ -18,12 +18,14 @@
|
|
18
18
|
"not ie 11"
|
19
19
|
],
|
20
20
|
"dependencies": {
|
21
|
-
"@data-fair/lib": "^
|
21
|
+
"@data-fair/lib-vue": "^1.13.10",
|
22
|
+
"@data-fair/lib-vuetify": "^1.6.6",
|
22
23
|
"@koumoul/v-iframe": "^2.4.4",
|
23
24
|
"@vueuse/core": "^10.7.2",
|
24
25
|
"ofetch": "^1.3.3",
|
26
|
+
"unplugin-fonts": "^1.3.1",
|
25
27
|
"vue": "^3.4.15",
|
26
|
-
"vuetify": "^3.
|
28
|
+
"vuetify": "^3.7.4"
|
27
29
|
},
|
28
30
|
"devDependencies": {
|
29
31
|
"@data-fair/dev-server": "^1.12.0",
|