@dhis2/analytics 26.3.0-alpha.1 → 26.3.0-alpha.3

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 (39) hide show
  1. package/build/cjs/__demo__/DimensionsPanel.stories.js +1 -0
  2. package/build/cjs/api/analytics/Analytics.js +0 -7
  3. package/build/cjs/api/analytics/AnalyticsBase.js +6 -24
  4. package/build/cjs/api/analytics/AnalyticsRequest.js +10 -33
  5. package/build/cjs/api/analytics/AnalyticsRequestBase.js +1 -3
  6. package/build/cjs/api/analytics/AnalyticsRequestPropertiesMixin.js +0 -19
  7. package/build/cjs/api/analytics/utils.js +2 -23
  8. package/build/cjs/assets/DynamicDimensionIcon.js +12 -38
  9. package/build/cjs/components/DimensionsPanel/List/DimensionItem.js +44 -32
  10. package/build/cjs/components/DimensionsPanel/List/OptionsButton.js +7 -6
  11. package/build/cjs/components/DimensionsPanel/List/RecommendedIcon.js +1 -2
  12. package/build/cjs/components/DimensionsPanel/List/__tests__/__snapshots__/DimensionItem.spec.js.snap +238 -361
  13. package/build/cjs/components/DimensionsPanel/List/styles/DimensionItem.style.js +5 -67
  14. package/build/cjs/components/DimensionsPanel/List/styles/DimensionList.style.js +2 -2
  15. package/build/cjs/components/DimensionsPanel/List/styles/RecommendedIcon.style.js +4 -4
  16. package/build/cjs/components/DimensionsPanel/styles/DimensionsPanel.style.js +1 -1
  17. package/build/cjs/modules/layout/dimension.js +2 -9
  18. package/build/cjs/modules/layout/dimensionCreate.js +0 -3
  19. package/build/es/__demo__/DimensionsPanel.stories.js +1 -0
  20. package/build/es/api/analytics/Analytics.js +0 -7
  21. package/build/es/api/analytics/AnalyticsBase.js +6 -24
  22. package/build/es/api/analytics/AnalyticsRequest.js +10 -33
  23. package/build/es/api/analytics/AnalyticsRequestBase.js +1 -3
  24. package/build/es/api/analytics/AnalyticsRequestPropertiesMixin.js +0 -19
  25. package/build/es/api/analytics/utils.js +1 -20
  26. package/build/es/assets/DynamicDimensionIcon.js +12 -38
  27. package/build/es/components/DimensionsPanel/List/DimensionItem.js +45 -33
  28. package/build/es/components/DimensionsPanel/List/OptionsButton.js +7 -6
  29. package/build/es/components/DimensionsPanel/List/RecommendedIcon.js +1 -2
  30. package/build/es/components/DimensionsPanel/List/__tests__/__snapshots__/DimensionItem.spec.js.snap +238 -361
  31. package/build/es/components/DimensionsPanel/List/styles/DimensionItem.style.js +4 -66
  32. package/build/es/components/DimensionsPanel/List/styles/DimensionList.style.js +2 -2
  33. package/build/es/components/DimensionsPanel/List/styles/RecommendedIcon.style.js +4 -4
  34. package/build/es/components/DimensionsPanel/styles/DimensionsPanel.style.js +1 -1
  35. package/build/es/modules/layout/dimension.js +1 -7
  36. package/build/es/modules/layout/dimensionCreate.js +1 -4
  37. package/package.json +1 -1
  38. package/build/cjs/api/analytics/AnalyticsTrackedEntities.js +0 -31
  39. package/build/es/api/analytics/AnalyticsTrackedEntities.js +0 -24
@@ -1,405 +1,282 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`DimensionItem matches the snapshot 1`] = `
4
- <li
5
- name="Period"
6
- onClick={[Function]}
7
- onMouseLeave={[Function]}
8
- onMouseOver={[Function]}
9
- style={
10
- Object {
11
- "alignItems": "center",
12
- "borderRadius": "2px",
13
- "cursor": "pointer",
14
- "display": "flex",
15
- "marginBottom": 3,
16
- "marginTop": 3,
17
- "minHeight": "24px",
18
- }
19
- }
20
- >
21
- <div
22
- className="label"
23
- data-test="undefined-button-pe"
24
- style={
25
- Object {
26
- "display": "flex",
27
- "outline": "none",
28
- }
29
- }
30
- tabIndex={0}
4
+ <Fragment>
5
+ <CssVariables
6
+ colors={true}
7
+ elevations={false}
8
+ layers={false}
9
+ spacers={false}
10
+ theme={false}
11
+ />
12
+ <li
13
+ className="item"
14
+ name="Period"
15
+ onClick={[Function]}
16
+ onMouseLeave={[Function]}
17
+ onMouseOver={[Function]}
18
+ style={Object {}}
31
19
  >
32
20
  <div
33
- style={
34
- Object {
35
- "display": "flex",
36
- "flexDirection": "column",
37
- "padding": "3px 8px 0 8px",
38
- }
39
- }
40
- >
41
- <SvgClock16
42
- style={
43
- Object {
44
- "paddingBottom": "2px",
45
- "paddingLeft": "6px",
46
- }
47
- }
48
- />
49
- </div>
50
- <div
51
- style={
52
- Object {
53
- "padding": "2px 5px 2px 0",
54
- }
55
- }
21
+ className="label"
22
+ data-test="undefined-button-pe"
23
+ tabIndex={0}
56
24
  >
57
- <span
58
- data-dimensionid="pe"
59
- style={
60
- Object {
61
- "color": "#212934",
62
- "fontSize": "14px",
63
- "userSelect": "none",
64
- "wordBreak": "break-word",
65
- }
66
- }
25
+ <div
26
+ className="iconWrapper"
67
27
  >
68
- Period
69
- </span>
70
- <RecommendedIcon
71
- dataTest="undefined-recommended-icon"
72
- isRecommended={false}
73
- />
28
+ <SvgClock16
29
+ className="fixedDimensionIcon"
30
+ />
31
+ </div>
32
+ <div
33
+ className="labelWrapper"
34
+ >
35
+ <span
36
+ className="labelText"
37
+ >
38
+ <span
39
+ data-dimensionid="pe"
40
+ >
41
+ Period
42
+ </span>
43
+ </span>
44
+ <RecommendedIcon
45
+ dataTest="undefined-recommended-icon"
46
+ isRecommended={false}
47
+ />
48
+ </div>
74
49
  </div>
75
- </div>
76
- </li>
50
+ </li>
51
+ <style />
52
+ </Fragment>
77
53
  `;
78
54
 
79
55
  exports[`DimensionItem matches the snapshot with locked 1`] = `
80
- <li
81
- name="Period"
82
- onClick={[Function]}
83
- onMouseLeave={[Function]}
84
- onMouseOver={[Function]}
85
- style={
86
- Object {
87
- "alignItems": "center",
88
- "borderRadius": "2px",
89
- "cursor": "pointer",
90
- "display": "flex",
91
- "marginBottom": 3,
92
- "marginTop": 3,
93
- "minHeight": "24px",
94
- }
95
- }
96
- >
97
- <div
98
- className="label"
99
- data-test="undefined-button-pe"
100
- style={
101
- Object {
102
- "display": "flex",
103
- "outline": "none",
104
- }
105
- }
106
- tabIndex={0}
56
+ <Fragment>
57
+ <CssVariables
58
+ colors={true}
59
+ elevations={false}
60
+ layers={false}
61
+ spacers={false}
62
+ theme={false}
63
+ />
64
+ <li
65
+ className="item"
66
+ name="Period"
67
+ onClick={[Function]}
68
+ onMouseLeave={[Function]}
69
+ onMouseOver={[Function]}
70
+ style={Object {}}
107
71
  >
108
72
  <div
109
- style={
110
- Object {
111
- "display": "flex",
112
- "flexDirection": "column",
113
- "padding": "3px 8px 0 8px",
114
- }
115
- }
116
- >
117
- <SvgClock16
118
- style={
119
- Object {
120
- "paddingBottom": "2px",
121
- "paddingLeft": "6px",
122
- }
123
- }
124
- />
125
- </div>
126
- <div
127
- style={
128
- Object {
129
- "padding": "2px 5px 2px 0",
130
- }
131
- }
73
+ className="label"
74
+ data-test="undefined-button-pe"
75
+ tabIndex={0}
132
76
  >
133
- <span
134
- data-dimensionid="pe"
135
- style={
136
- Object {
137
- "color": "#212934",
138
- "fontSize": "14px",
139
- "userSelect": "none",
140
- "wordBreak": "break-word",
141
- }
142
- }
77
+ <div
78
+ className="iconWrapper"
143
79
  >
144
- Period
145
- </span>
146
- <RecommendedIcon
147
- dataTest="undefined-recommended-icon"
148
- isRecommended={false}
149
- />
80
+ <SvgClock16
81
+ className="fixedDimensionIcon"
82
+ />
83
+ </div>
84
+ <div
85
+ className="labelWrapper"
86
+ >
87
+ <span
88
+ className="labelText"
89
+ >
90
+ <span
91
+ data-dimensionid="pe"
92
+ >
93
+ Period
94
+ </span>
95
+ </span>
96
+ <RecommendedIcon
97
+ dataTest="undefined-recommended-icon"
98
+ isRecommended={false}
99
+ />
100
+ </div>
150
101
  </div>
151
102
  <div
152
- style={
153
- Object {
154
- "display": "flex",
155
- "flexDirection": "column",
156
- "padding": "3px 8px 0 8px",
157
- }
158
- }
103
+ className="lockWrapper"
159
104
  >
160
- <SvgLock16 />
105
+ <svg
106
+ fill="none"
107
+ height="9"
108
+ width="7"
109
+ xmlns="http://www.w3.org/2000/svg"
110
+ >
111
+ <path
112
+ clipRule="evenodd"
113
+ d="M3.5 1A1.5 1.5 0 0 0 2 2.5V3h3v-.5A1.5 1.5 0 0 0 3.5 1ZM1 2.5V3H0v6h7V3H6v-.5a2.5 2.5 0 0 0-5 0ZM1 8V4h5v4H1Zm3-1V5H3v2h1Z"
114
+ fill="none"
115
+ fillRule="evenodd"
116
+ />
117
+ </svg>
161
118
  </div>
162
- </div>
163
- </li>
119
+ </li>
120
+ <style />
121
+ </Fragment>
164
122
  `;
165
123
 
166
124
  exports[`DimensionItem matches the snapshot with onOptionsClick 1`] = `
167
- <li
168
- name="Period"
169
- onClick={[Function]}
170
- onMouseLeave={[Function]}
171
- onMouseOver={[Function]}
172
- style={
173
- Object {
174
- "alignItems": "center",
175
- "borderRadius": "2px",
176
- "cursor": "pointer",
177
- "display": "flex",
178
- "marginBottom": 3,
179
- "marginTop": 3,
180
- "minHeight": "24px",
181
- }
182
- }
183
- >
184
- <div
185
- className="label"
186
- data-test="undefined-button-pe"
187
- style={
188
- Object {
189
- "display": "flex",
190
- "outline": "none",
191
- }
192
- }
193
- tabIndex={0}
125
+ <Fragment>
126
+ <CssVariables
127
+ colors={true}
128
+ elevations={false}
129
+ layers={false}
130
+ spacers={false}
131
+ theme={false}
132
+ />
133
+ <li
134
+ className="item"
135
+ name="Period"
136
+ onClick={[Function]}
137
+ onMouseLeave={[Function]}
138
+ onMouseOver={[Function]}
139
+ style={Object {}}
194
140
  >
195
141
  <div
196
- style={
197
- Object {
198
- "display": "flex",
199
- "flexDirection": "column",
200
- "padding": "3px 8px 0 8px",
201
- }
202
- }
203
- >
204
- <SvgClock16
205
- style={
206
- Object {
207
- "paddingBottom": "2px",
208
- "paddingLeft": "6px",
209
- }
210
- }
211
- />
212
- </div>
213
- <div
214
- style={
215
- Object {
216
- "padding": "2px 5px 2px 0",
217
- }
218
- }
142
+ className="label"
143
+ data-test="undefined-button-pe"
144
+ tabIndex={0}
219
145
  >
220
- <span
221
- data-dimensionid="pe"
222
- style={
223
- Object {
224
- "color": "#212934",
225
- "fontSize": "14px",
226
- "userSelect": "none",
227
- "wordBreak": "break-word",
228
- }
229
- }
146
+ <div
147
+ className="iconWrapper"
148
+ >
149
+ <SvgClock16
150
+ className="fixedDimensionIcon"
151
+ />
152
+ </div>
153
+ <div
154
+ className="labelWrapper"
230
155
  >
231
- Period
232
- </span>
233
- <RecommendedIcon
234
- dataTest="undefined-recommended-icon"
235
- isRecommended={false}
236
- />
156
+ <span
157
+ className="labelText"
158
+ >
159
+ <span
160
+ data-dimensionid="pe"
161
+ >
162
+ Period
163
+ </span>
164
+ </span>
165
+ <RecommendedIcon
166
+ dataTest="undefined-recommended-icon"
167
+ isRecommended={false}
168
+ />
169
+ </div>
237
170
  </div>
238
- </div>
239
- <div
240
- data-test="undefined-menu-pe"
241
- style={
242
- Object {
243
- "height": "20px",
244
- "left": "5px",
245
- "position": "relative",
246
- "width": "20px",
247
- }
248
- }
249
- />
250
- </li>
171
+ <div
172
+ className="optionsWrapper"
173
+ data-test="undefined-menu-pe"
174
+ />
175
+ </li>
176
+ <style />
177
+ </Fragment>
251
178
  `;
252
179
 
253
180
  exports[`DimensionItem matches the snapshot with recommended 1`] = `
254
- <li
255
- name="Period"
256
- onClick={[Function]}
257
- onMouseLeave={[Function]}
258
- onMouseOver={[Function]}
259
- style={
260
- Object {
261
- "alignItems": "center",
262
- "borderRadius": "2px",
263
- "cursor": "pointer",
264
- "display": "flex",
265
- "marginBottom": 3,
266
- "marginTop": 3,
267
- "minHeight": "24px",
268
- }
269
- }
270
- >
271
- <div
272
- className="label"
273
- data-test="undefined-button-pe"
274
- style={
275
- Object {
276
- "display": "flex",
277
- "outline": "none",
278
- }
279
- }
280
- tabIndex={0}
181
+ <Fragment>
182
+ <CssVariables
183
+ colors={true}
184
+ elevations={false}
185
+ layers={false}
186
+ spacers={false}
187
+ theme={false}
188
+ />
189
+ <li
190
+ className="item"
191
+ name="Period"
192
+ onClick={[Function]}
193
+ onMouseLeave={[Function]}
194
+ onMouseOver={[Function]}
195
+ style={Object {}}
281
196
  >
282
197
  <div
283
- style={
284
- Object {
285
- "display": "flex",
286
- "flexDirection": "column",
287
- "padding": "3px 8px 0 8px",
288
- }
289
- }
290
- >
291
- <SvgClock16
292
- style={
293
- Object {
294
- "paddingBottom": "2px",
295
- "paddingLeft": "6px",
296
- }
297
- }
298
- />
299
- </div>
300
- <div
301
- style={
302
- Object {
303
- "padding": "2px 5px 2px 0",
304
- }
305
- }
198
+ className="label"
199
+ data-test="undefined-button-pe"
200
+ tabIndex={0}
306
201
  >
307
- <span
308
- data-dimensionid="pe"
309
- style={
310
- Object {
311
- "color": "#212934",
312
- "fontSize": "14px",
313
- "userSelect": "none",
314
- "wordBreak": "break-word",
315
- }
316
- }
202
+ <div
203
+ className="iconWrapper"
204
+ >
205
+ <SvgClock16
206
+ className="fixedDimensionIcon"
207
+ />
208
+ </div>
209
+ <div
210
+ className="labelWrapper"
317
211
  >
318
- Period
319
- </span>
320
- <RecommendedIcon
321
- dataTest="undefined-recommended-icon"
322
- isRecommended={true}
323
- />
212
+ <span
213
+ className="labelText"
214
+ >
215
+ <span
216
+ data-dimensionid="pe"
217
+ >
218
+ Period
219
+ </span>
220
+ </span>
221
+ <RecommendedIcon
222
+ dataTest="undefined-recommended-icon"
223
+ isRecommended={true}
224
+ />
225
+ </div>
324
226
  </div>
325
- </div>
326
- </li>
227
+ </li>
228
+ <style />
229
+ </Fragment>
327
230
  `;
328
231
 
329
232
  exports[`DimensionItem matches the snapshot with selected 1`] = `
330
- <li
331
- name="Period"
332
- onClick={[Function]}
333
- onMouseLeave={[Function]}
334
- onMouseOver={[Function]}
335
- style={
336
- Object {
337
- "alignItems": "center",
338
- "backgroundColor": "#e0f2f1",
339
- "borderRadius": "2px",
340
- "cursor": "pointer",
341
- "display": "flex",
342
- "fontWeight": 500,
343
- "marginBottom": 3,
344
- "marginTop": 3,
345
- "minHeight": "24px",
346
- }
347
- }
348
- >
349
- <div
350
- className="label"
351
- data-test="undefined-button-pe"
352
- style={
353
- Object {
354
- "display": "flex",
355
- "outline": "none",
356
- }
357
- }
358
- tabIndex={0}
233
+ <Fragment>
234
+ <CssVariables
235
+ colors={true}
236
+ elevations={false}
237
+ layers={false}
238
+ spacers={false}
239
+ theme={false}
240
+ />
241
+ <li
242
+ className="item selected"
243
+ name="Period"
244
+ onClick={[Function]}
245
+ onMouseLeave={[Function]}
246
+ onMouseOver={[Function]}
247
+ style={Object {}}
359
248
  >
360
249
  <div
361
- style={
362
- Object {
363
- "display": "flex",
364
- "flexDirection": "column",
365
- "padding": "3px 8px 0 8px",
366
- }
367
- }
250
+ className="label"
251
+ data-test="undefined-button-pe"
252
+ tabIndex={0}
368
253
  >
369
- <SvgClock16
370
- style={
371
- Object {
372
- "paddingBottom": "2px",
373
- "paddingLeft": "6px",
374
- }
375
- }
376
- />
377
- </div>
378
- <div
379
- style={
380
- Object {
381
- "padding": "2px 5px 2px 0",
382
- }
383
- }
384
- >
385
- <span
386
- data-dimensionid="pe"
387
- style={
388
- Object {
389
- "color": "#212934",
390
- "fontSize": "14px",
391
- "userSelect": "none",
392
- "wordBreak": "break-word",
393
- }
394
- }
254
+ <div
255
+ className="iconWrapper"
256
+ >
257
+ <SvgClock16
258
+ className="fixedDimensionIcon"
259
+ />
260
+ </div>
261
+ <div
262
+ className="labelWrapper"
395
263
  >
396
- Period
397
- </span>
398
- <RecommendedIcon
399
- dataTest="undefined-recommended-icon"
400
- isRecommended={false}
401
- />
264
+ <span
265
+ className="labelText"
266
+ >
267
+ <span
268
+ data-dimensionid="pe"
269
+ >
270
+ Period
271
+ </span>
272
+ </span>
273
+ <RecommendedIcon
274
+ dataTest="undefined-recommended-icon"
275
+ isRecommended={false}
276
+ />
277
+ </div>
402
278
  </div>
403
- </div>
404
- </li>
279
+ </li>
280
+ <style />
281
+ </Fragment>
405
282
  `;