@sis-cc/dotstatsuite-components 14.3.6 → 15.0.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.
Files changed (36) hide show
  1. package/lib/app.js +2 -6
  2. package/lib/index.js +9 -18
  3. package/lib/rules/src/index.js +142 -1
  4. package/lib/rules/src/properties/index.js +2 -5
  5. package/lib/rules/src/table/preparators/prepareData.js +4 -15
  6. package/lib/rules2/src/duplicateObservations.js +22 -38
  7. package/lib/rules2/src/index.js +63 -0
  8. package/lib/viewer/src/chart.js +1 -43
  9. package/package.json +2 -2
  10. package/src/app.js +0 -2
  11. package/src/index.js +0 -1
  12. package/src/rules/src/index.js +19 -0
  13. package/src/rules/src/properties/index.js +1 -4
  14. package/src/rules/src/table/preparators/prepareData.js +2 -10
  15. package/src/rules2/src/duplicateObservations.js +25 -39
  16. package/src/rules2/src/index.js +11 -0
  17. package/src/viewer/src/chart.js +1 -32
  18. package/test/duplicateObs.test.js +83 -0
  19. package/test/mocks/table-prep-simple-duplicate--dimensions2.json +858 -0
  20. package/test/mocks/table-prep-simple-duplicate--duplicated2.json +77502 -0
  21. package/test/mocks/table-prep-simple-duplicate--observations2.json +60002 -0
  22. package/test/table-prep-duplicate-perf.test.js +8 -14
  23. package/lib/rules-driver/src/app.js +0 -152
  24. package/lib/rules-driver/src/index.js +0 -97
  25. package/src/rules-driver/README.md +0 -131
  26. package/src/rules-driver/src/app.js +0 -123
  27. package/src/rules-driver/src/index.js +0 -60
  28. package/src/rules-driver/src/mocks/data1.json +0 -332
  29. package/src/rules-driver/src/mocks/data2.json +0 -309
  30. package/test/duplicateObservations.test.js +0 -108
  31. package/test/mocks/table-prep-multi-duplicate--duplicated.json +0 -26938
  32. package/test/mocks/table-prep-multi-duplicate--indexes.json +0 -1417
  33. package/test/mocks/table-prep-multi-duplicate--observations.json +0 -20330
  34. package/test/mocks/table-prep-simple-duplicate--duplicated.json +0 -77502
  35. package/test/mocks/table-prep-simple-duplicate--indexes.json +0 -274
  36. package/test/mocks/table-prep-simple-duplicate--observations.json +0 -60002
@@ -1,332 +0,0 @@
1
- {
2
- "header": {
3
- "schema": "https://raw.githubusercontent.com/sdmx-twg/sdmx-json/master/data-message/tools/schemas/1.0/sdmx-json-data-schema.json",
4
- "id": "IREF000446",
5
- "prepared": "2021-09-07T13:44:06Z",
6
- "test": true,
7
- "contentLanguages": [
8
- "en"
9
- ],
10
- "sender": {
11
- "id": "SIS-CC-stable_-_DotStat_v8",
12
- "name": "unknown",
13
- "names": {
14
- "en": "unknown"
15
- }
16
- }
17
- },
18
- "dataSets": [
19
- {
20
- "action": "Information",
21
- "links": [
22
- {
23
- "urn": "urn:sdmx:org.sdmx.infomodel.datastructure.DataStructure=OECD:DSD_KEI(1.0)",
24
- "rel": "DataStructure"
25
- }
26
- ],
27
- "annotations": [
28
- 0,
29
- 1,
30
- 2,
31
- 3,
32
- 4
33
- ],
34
- "observations": {
35
- "0:0:0:0:0": [
36
- 5.73333333333333
37
- ],
38
- "0:1:0:0:0": [
39
- 8.5
40
- ],
41
- "0:2:0:0:0": [
42
- 6.05642340833333
43
- ]
44
- }
45
- }
46
- ],
47
- "structure": {
48
- "name": "Harmonised Unemployment Rate",
49
- "names": {
50
- "en": "Harmonised Unemployment Rate"
51
- },
52
- "dimensions": {
53
- "observation": [
54
- {
55
- "id": "SUBJECT",
56
- "name": "Subject",
57
- "names": {
58
- "en": "Subject"
59
- },
60
- "keyPosition": 0,
61
- "roles": [
62
- "SUBJECT"
63
- ],
64
- "values": [
65
- {
66
- "id": "LRHUTTTT",
67
- "order": 75,
68
- "name": "Harmonised unemployment rate: all persons, s.a.",
69
- "names": {
70
- "en": "Harmonised unemployment rate: all persons, s.a."
71
- },
72
- "parent": "LR",
73
- "annotations": [
74
- 5
75
- ],
76
- "__indexPosition": 0,
77
- "__index": 0
78
- }
79
- ],
80
- "role": "SUBJECT"
81
- },
82
- {
83
- "id": "LOCATION",
84
- "name": "Country",
85
- "names": {
86
- "en": "Country"
87
- },
88
- "keyPosition": 1,
89
- "roles": [
90
- "LOCATION"
91
- ],
92
- "values": [
93
- {
94
- "id": "AUS",
95
- "order": 0,
96
- "name": "Australia",
97
- "names": {
98
- "en": "Australia"
99
- },
100
- "annotations": [
101
- 5
102
- ],
103
- "__indexPosition": 0,
104
- "__index": 2
105
- },
106
- {
107
- "id": "AUT",
108
- "order": 1,
109
- "name": "Austria",
110
- "names": {
111
- "en": "Austria"
112
- },
113
- "annotations": [
114
- 6
115
- ],
116
- "__indexPosition": 1,
117
- "__index": 0
118
- },
119
- {
120
- "id": "BEL",
121
- "order": 2,
122
- "name": "Belgium",
123
- "names": {
124
- "en": "Belgium"
125
- },
126
- "annotations": [
127
- 7
128
- ],
129
- "__indexPosition": 2,
130
- "__index": 1
131
- }
132
- ],
133
- "role": "LOCATION"
134
- },
135
- {
136
- "id": "MEASURE",
137
- "name": "Measure",
138
- "names": {
139
- "en": "Measure"
140
- },
141
- "keyPosition": 2,
142
- "roles": [
143
- "MEASURE"
144
- ],
145
- "values": [
146
- {
147
- "id": "ST",
148
- "order": 5,
149
- "name": "Level, ratio or index",
150
- "names": {
151
- "en": "Level, ratio or index"
152
- },
153
- "annotations": [
154
- 7
155
- ],
156
- "__indexPosition": 0,
157
- "__index": 0
158
- }
159
- ],
160
- "role": "MEASURE"
161
- },
162
- {
163
- "id": "FREQUENCY",
164
- "name": "Frequency",
165
- "names": {
166
- "en": "Frequency"
167
- },
168
- "keyPosition": 3,
169
- "roles": [
170
- "FREQUENCY"
171
- ],
172
- "values": [
173
- {
174
- "id": "A",
175
- "order": 0,
176
- "name": "Annual",
177
- "names": {
178
- "en": "Annual"
179
- },
180
- "annotations": [
181
- 8
182
- ],
183
- "__indexPosition": 0,
184
- "__index": 0
185
- }
186
- ],
187
- "role": "FREQUENCY"
188
- },
189
- {
190
- "id": "TIME_PERIOD",
191
- "name": "Time",
192
- "names": {
193
- "en": "Time"
194
- },
195
- "keyPosition": 4,
196
- "roles": [
197
- "TIME"
198
- ],
199
- "values": [
200
- {
201
- "start": "2015-01-01T00:00:00Z",
202
- "end": "2015-12-31T23:59:59Z",
203
- "id": "2015",
204
- "name": "2015",
205
- "names": {
206
- "en": "2015"
207
- },
208
- "__indexPosition": 0,
209
- "__index": 0
210
- }
211
- ],
212
- "role": "TIME"
213
- }
214
- ]
215
- },
216
- "attributes": {
217
- "dataSet": [
218
- {
219
- "id": "OBS_STATUS",
220
- "name": "Observation Status",
221
- "names": {
222
- "en": "Observation Status"
223
- },
224
- "roles": [
225
- "OBS_STATUS"
226
- ],
227
- "relationship": {
228
- "none": {}
229
- },
230
- "values": []
231
- },
232
- {
233
- "id": "UNIT_MEASURE",
234
- "name": "Unit of Measures",
235
- "names": {
236
- "en": "Unit of Measures"
237
- },
238
- "roles": [
239
- "UNIT_MEASURE"
240
- ],
241
- "relationship": {
242
- "none": {}
243
- },
244
- "values": []
245
- },
246
- {
247
- "id": "UNIT_MULT",
248
- "name": "Multiplier",
249
- "names": {
250
- "en": "Multiplier"
251
- },
252
- "roles": [
253
- "UNIT_MULT"
254
- ],
255
- "relationship": {
256
- "none": {}
257
- },
258
- "values": []
259
- },
260
- {
261
- "id": "BASE_PER",
262
- "name": "Base reference period",
263
- "names": {
264
- "en": "Base reference period"
265
- },
266
- "roles": [
267
- "BASE_PER"
268
- ],
269
- "relationship": {
270
- "none": {}
271
- },
272
- "values": []
273
- }
274
- ],
275
- "series": [],
276
- "observation": []
277
- },
278
- "annotations": [
279
- {
280
- "type": "NonProductionDataflow",
281
- "text": "true",
282
- "texts": {
283
- "en": "true"
284
- }
285
- },
286
- {
287
- "title": "FREQUENCY=A,SUBJECT=LRHUTTTT,TIME_PERIOD_START=2015",
288
- "type": "DEFAULT"
289
- },
290
- {
291
- "title": "LOCATION",
292
- "type": "LAYOUT_ROW"
293
- },
294
- {
295
- "title": "TIME_PERIOD",
296
- "type": "LAYOUT_COLUMN"
297
- },
298
- {
299
- "title": "FREQ",
300
- "type": "NOT_DISPLAYED"
301
- },
302
- {
303
- "type": "ORDER",
304
- "text": "1",
305
- "texts": {
306
- "en": "1"
307
- }
308
- },
309
- {
310
- "type": "ORDER",
311
- "text": "2",
312
- "texts": {
313
- "en": "2"
314
- }
315
- },
316
- {
317
- "type": "ORDER",
318
- "text": "3",
319
- "texts": {
320
- "en": "3"
321
- }
322
- },
323
- {
324
- "type": "ORDER",
325
- "text": "0",
326
- "texts": {
327
- "en": "0"
328
- }
329
- }
330
- ]
331
- }
332
- }
@@ -1,309 +0,0 @@
1
- {
2
- "header": {
3
- "schema": "https://raw.githubusercontent.com/sdmx-twg/sdmx-json/master/data-message/tools/schemas/1.0/sdmx-json-data-schema.json",
4
- "id": "IREF000457",
5
- "prepared": "2021-09-07T22:43:19Z",
6
- "test": true,
7
- "contentLanguages": [
8
- "en"
9
- ],
10
- "sender": {
11
- "id": "SIS-CC-stable_-_DotStat_v8",
12
- "name": "unknown",
13
- "names": {
14
- "en": "unknown"
15
- }
16
- }
17
- },
18
- "dataSets": [
19
- {
20
- "action": "Information",
21
- "links": [
22
- {
23
- "urn": "urn:sdmx:org.sdmx.infomodel.datastructure.DataStructure=OECD:DSD_KEI(1.0)",
24
- "rel": "DataStructure"
25
- }
26
- ],
27
- "annotations": [
28
- 0,
29
- 1,
30
- 2,
31
- 3,
32
- 4
33
- ],
34
- "observations": {
35
- "0:0:0:0:0": [
36
- 8.5
37
- ],
38
- "0:1:0:0:0": [
39
- 6.05642340833333
40
- ]
41
- }
42
- }
43
- ],
44
- "structure": {
45
- "name": "Harmonised Unemployment Rate",
46
- "names": {
47
- "en": "Harmonised Unemployment Rate"
48
- },
49
- "dimensions": {
50
- "observation": [
51
- {
52
- "id": "SUBJECT",
53
- "name": "Subject",
54
- "names": {
55
- "en": "Subject"
56
- },
57
- "keyPosition": 0,
58
- "roles": [
59
- "SUBJECT"
60
- ],
61
- "values": [
62
- {
63
- "id": "LRHUTTTT",
64
- "order": 75,
65
- "name": "Harmonised unemployment rate: all persons, s.a.",
66
- "names": {
67
- "en": "Harmonised unemployment rate: all persons, s.a."
68
- },
69
- "parent": "LR",
70
- "annotations": [
71
- 5
72
- ],
73
- "__indexPosition": 0,
74
- "__index": 0
75
- }
76
- ],
77
- "role": "SUBJECT"
78
- },
79
- {
80
- "id": "LOCATION",
81
- "name": "Country",
82
- "names": {
83
- "en": "Country"
84
- },
85
- "keyPosition": 1,
86
- "roles": [
87
- "LOCATION"
88
- ],
89
- "values": [
90
- {
91
- "id": "AUS",
92
- "order": 0,
93
- "name": "Australia",
94
- "names": {
95
- "en": "Australia"
96
- },
97
- "annotations": [
98
- 5
99
- ],
100
- "__indexPosition": 0,
101
- "__index": 1
102
- },
103
- {
104
- "id": "BEL",
105
- "order": 2,
106
- "name": "Belgium",
107
- "names": {
108
- "en": "Belgium"
109
- },
110
- "annotations": [
111
- 6
112
- ],
113
- "__indexPosition": 1,
114
- "__index": 0
115
- }
116
- ],
117
- "role": "LOCATION"
118
- },
119
- {
120
- "id": "MEASURE",
121
- "name": "Measure",
122
- "names": {
123
- "en": "Measure"
124
- },
125
- "keyPosition": 2,
126
- "roles": [
127
- "MEASURE"
128
- ],
129
- "values": [
130
- {
131
- "id": "ST",
132
- "order": 5,
133
- "name": "Level, ratio or index",
134
- "names": {
135
- "en": "Level, ratio or index"
136
- },
137
- "annotations": [
138
- 6
139
- ],
140
- "__indexPosition": 0,
141
- "__index": 0
142
- }
143
- ],
144
- "role": "MEASURE"
145
- },
146
- {
147
- "id": "FREQUENCY",
148
- "name": "Frequency",
149
- "names": {
150
- "en": "Frequency"
151
- },
152
- "keyPosition": 3,
153
- "roles": [
154
- "FREQUENCY"
155
- ],
156
- "values": [
157
- {
158
- "id": "A",
159
- "order": 0,
160
- "name": "Annual",
161
- "names": {
162
- "en": "Annual"
163
- },
164
- "annotations": [
165
- 7
166
- ],
167
- "__indexPosition": 0,
168
- "__index": 0
169
- }
170
- ],
171
- "role": "FREQUENCY"
172
- },
173
- {
174
- "id": "TIME_PERIOD",
175
- "name": "Time",
176
- "names": {
177
- "en": "Time"
178
- },
179
- "keyPosition": 4,
180
- "roles": [
181
- "TIME"
182
- ],
183
- "values": [
184
- {
185
- "start": "2015-01-01T00:00:00Z",
186
- "end": "2015-12-31T23:59:59Z",
187
- "id": "2015",
188
- "name": "2015",
189
- "names": {
190
- "en": "2015"
191
- },
192
- "__indexPosition": 0,
193
- "__index": 0
194
- }
195
- ],
196
- "role": "TIME"
197
- }
198
- ]
199
- },
200
- "attributes": {
201
- "dataSet": [
202
- {
203
- "id": "OBS_STATUS",
204
- "name": "Observation Status",
205
- "names": {
206
- "en": "Observation Status"
207
- },
208
- "roles": [
209
- "OBS_STATUS"
210
- ],
211
- "relationship": {
212
- "none": {}
213
- },
214
- "values": []
215
- },
216
- {
217
- "id": "UNIT_MEASURE",
218
- "name": "Unit of Measures",
219
- "names": {
220
- "en": "Unit of Measures"
221
- },
222
- "roles": [
223
- "UNIT_MEASURE"
224
- ],
225
- "relationship": {
226
- "none": {}
227
- },
228
- "values": []
229
- },
230
- {
231
- "id": "UNIT_MULT",
232
- "name": "Multiplier",
233
- "names": {
234
- "en": "Multiplier"
235
- },
236
- "roles": [
237
- "UNIT_MULT"
238
- ],
239
- "relationship": {
240
- "none": {}
241
- },
242
- "values": []
243
- },
244
- {
245
- "id": "BASE_PER",
246
- "name": "Base reference period",
247
- "names": {
248
- "en": "Base reference period"
249
- },
250
- "roles": [
251
- "BASE_PER"
252
- ],
253
- "relationship": {
254
- "none": {}
255
- },
256
- "values": []
257
- }
258
- ],
259
- "series": [],
260
- "observation": []
261
- },
262
- "annotations": [
263
- {
264
- "type": "NonProductionDataflow",
265
- "text": "true",
266
- "texts": {
267
- "en": "true"
268
- }
269
- },
270
- {
271
- "title": "FREQUENCY=A,SUBJECT=LRHUTTTT,TIME_PERIOD_START=2015",
272
- "type": "DEFAULT"
273
- },
274
- {
275
- "title": "LOCATION",
276
- "type": "LAYOUT_ROW"
277
- },
278
- {
279
- "title": "TIME_PERIOD",
280
- "type": "LAYOUT_COLUMN"
281
- },
282
- {
283
- "title": "FREQ",
284
- "type": "NOT_DISPLAYED"
285
- },
286
- {
287
- "type": "ORDER",
288
- "text": "1",
289
- "texts": {
290
- "en": "1"
291
- }
292
- },
293
- {
294
- "type": "ORDER",
295
- "text": "3",
296
- "texts": {
297
- "en": "3"
298
- }
299
- },
300
- {
301
- "type": "ORDER",
302
- "text": "0",
303
- "texts": {
304
- "en": "0"
305
- }
306
- }
307
- ]
308
- }
309
- }