@data-fair/app-dashboards 0.3.8 → 0.4.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.
@@ -4,7 +4,7 @@
4
4
  "datasets": {
5
5
  "type": "array",
6
6
  "items": [{
7
- "title": "Source des valeurs pour le filtre commun",
7
+ "title": "Source des valeurs pour les filtres",
8
8
  "type": "object",
9
9
  "x-fromUrl": "api/v1/datasets?status=finalized&q={q}&select=id,title,schema&owner={context.owner.type}:{context.owner.id}",
10
10
  "x-itemsProp": "results",
@@ -26,28 +26,57 @@
26
26
  }
27
27
  }]
28
28
  },
29
- "labelField": {
30
- "title": "Colonne de libellé pour le filtre commun",
31
- "type": "string",
32
- "x-fromUrl": "{datasets.0.href}/schema?calculated=false&separator=false",
33
- "x-itemTitle": "label",
34
- "x-itemKey": "key"
35
- },
36
- "forceOneValue":{
37
- "title": "Toujours filtrer par une valeur",
38
- "type": "boolean",
39
- "default": false
40
- },
41
- "startValue": {
42
- "type": "string",
43
- "title": "Valeur initiale",
44
- "x-fromUrl": "{datasets.0.href}/values/{labelField}?q={q}&q_mode=complete&size=100&stringify=true",
45
- "x-if": "forceOneValue"
46
- },
47
- "showAllValues":{
48
- "title": "Garder toutes les valeurs dans la liste",
49
- "type": "boolean",
50
- "default": false
29
+ "conceptFilters":{
30
+ "type": "array",
31
+ "title": "Filtres du tableau de bord",
32
+ "items": {
33
+ "type": "object",
34
+ "required": ["labelField"],
35
+ "properties": {
36
+ "labelField": {
37
+ "title": "Colonne de libellé du filtre",
38
+ "type": "object",
39
+ "x-fromUrl": "{datasets.0.href}/schema?calculated=false&separator=false",
40
+ "x-itemTitle": "label",
41
+ "x-itemKey": "key",
42
+ "properties": {
43
+ "key": {"type": "string"},
44
+ "label": {"type": "string"}
45
+ }
46
+ },
47
+ "concepts": {
48
+ "type": "array",
49
+ "x-fromUrl": "{datasets.0.href}/schema?calculated=false&separator=false&concept=true",
50
+ "x-itemKey": "key",
51
+ "x-itemTitle": "label",
52
+ "items": {
53
+ "title": "Colonnes pour les valeurs du filtre",
54
+ "type": "object",
55
+ "properties": {
56
+ "key": {"type": "string"},
57
+ "label": {"type": "string"},
58
+ "x-concept": {"type": "object"}
59
+ }
60
+ }
61
+ },
62
+ "forceOneValue":{
63
+ "title": "Toujours filtrer par une valeur",
64
+ "type": "boolean",
65
+ "default": false
66
+ },
67
+ "startValue": {
68
+ "type": "string",
69
+ "title": "Valeur initiale",
70
+ "x-fromUrl": "{datasets.0.href}/values/{parent.value.labelField.key}?q={q}&q_mode=complete&size=100&stringify=true",
71
+ "x-if": "parent.value.forceOneValue"
72
+ },
73
+ "showAllValues":{
74
+ "title": "Garder toutes les valeurs dans la liste",
75
+ "type": "boolean",
76
+ "default": false
77
+ }
78
+ }
79
+ }
51
80
  },
52
81
  "title": {
53
82
  "type": "string",
@@ -147,16 +176,19 @@
147
176
  "title": "Prévisualisation table",
148
177
  "properties": {
149
178
  "type": { "const": "tablePreview", "title": "Type de l'élément" },
150
- "concept": {
151
- "title": "Colonne du filtre commun",
179
+ "concepts": {
180
+ "type": "array",
152
181
  "x-fromUrl": "{datasets.0.href}/schema?calculated=false&separator=false&concept=true",
153
- "x-itemKey": "id",
182
+ "x-itemKey": "key",
154
183
  "x-itemTitle": "label",
155
- "type": "object",
156
- "properties": {
157
- "key": {"type": "string"},
158
- "label": {"type": "string"},
159
- "x-concept": {"type": "object"}
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
+ }
160
192
  }
161
193
  },
162
194
  "valueMandatory": {
@@ -166,7 +198,7 @@
166
198
  },
167
199
  "dataset": {
168
200
  "type": "object",
169
- "x-fromUrl": "api/v1/datasets?q={q}&short-concept={parent.value.concept['x-concept'].id}&{context.datasetFilter}&select=id,title",
201
+ "x-fromUrl": "api/v1/datasets?q={q}&{context.datasetFilter}&select=id,title",
170
202
  "x-itemKey": "id",
171
203
  "x-itemTitle": "title",
172
204
  "x-itemsProp": "results",
@@ -215,17 +247,20 @@
215
247
  "title": "Visualisation",
216
248
  "properties": {
217
249
  "type": { "const": "application", "title": "Type de l'élément" },
218
- "concept": {
219
- "title": "Colonne du filtre commun",
250
+ "concepts": {
251
+ "type": "array",
220
252
  "x-fromUrl": "{datasets.0.href}/schema?calculated=false&separator=false&concept=true",
221
- "x-itemKey": "id",
253
+ "x-itemKey": "key",
222
254
  "x-itemTitle": "label",
223
- "type": "object",
224
- "properties": {
225
- "key": {"type": "string"},
226
- "label": {"type": "string"},
227
- "x-concept": {"type": "object"}
228
- }
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
+ }]
229
264
  },
230
265
  "valueMandatory": {
231
266
  "title": "Nécessite une valeur dans le filtre",
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.3.8/dist/assets/index-751eaaad.js"></script>
24
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@data-fair/app-dashboards@0.3.8/dist/assets/index-8c4fee1d.css">
23
+ <script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/@data-fair/app-dashboards@0.4.1/dist/assets/index-d44b6f42.js"></script>
24
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@data-fair/app-dashboards@0.4.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.3.8",
3
+ "version": "0.4.1",
4
4
  "scripts": {
5
5
  "dev": "APP_URL=http://localhost:3000/app/ df-dev-server",
6
6
  "dev-src": "vite",