@dhis2/analytics 26.6.9 → 26.6.10

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 (21) hide show
  1. package/build/cjs/__demo__/DimensionsPanel.stories.js +1 -0
  2. package/build/cjs/assets/DynamicDimensionIcon.js +12 -38
  3. package/build/cjs/components/DimensionsPanel/List/DimensionItem.js +49 -33
  4. package/build/cjs/components/DimensionsPanel/List/OptionsButton.js +7 -6
  5. package/build/cjs/components/DimensionsPanel/List/RecommendedIcon.js +1 -2
  6. package/build/cjs/components/DimensionsPanel/List/__tests__/__snapshots__/DimensionItem.spec.js.snap +239 -361
  7. package/build/cjs/components/DimensionsPanel/List/styles/DimensionItem.style.js +5 -67
  8. package/build/cjs/components/DimensionsPanel/List/styles/DimensionList.style.js +2 -2
  9. package/build/cjs/components/DimensionsPanel/List/styles/RecommendedIcon.style.js +4 -4
  10. package/build/cjs/components/DimensionsPanel/styles/DimensionsPanel.style.js +1 -1
  11. package/build/es/__demo__/DimensionsPanel.stories.js +1 -0
  12. package/build/es/assets/DynamicDimensionIcon.js +12 -38
  13. package/build/es/components/DimensionsPanel/List/DimensionItem.js +50 -34
  14. package/build/es/components/DimensionsPanel/List/OptionsButton.js +7 -6
  15. package/build/es/components/DimensionsPanel/List/RecommendedIcon.js +1 -2
  16. package/build/es/components/DimensionsPanel/List/__tests__/__snapshots__/DimensionItem.spec.js.snap +239 -361
  17. package/build/es/components/DimensionsPanel/List/styles/DimensionItem.style.js +4 -66
  18. package/build/es/components/DimensionsPanel/List/styles/DimensionList.style.js +2 -2
  19. package/build/es/components/DimensionsPanel/List/styles/RecommendedIcon.style.js +4 -4
  20. package/build/es/components/DimensionsPanel/styles/DimensionsPanel.style.js +1 -1
  21. package/package.json +2 -2
@@ -1,405 +1,283 @@
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
+ <style />
120
+ </li>
121
+ <style />
122
+ </Fragment>
164
123
  `;
165
124
 
166
125
  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}
126
+ <Fragment>
127
+ <CssVariables
128
+ colors={true}
129
+ elevations={false}
130
+ layers={false}
131
+ spacers={false}
132
+ theme={false}
133
+ />
134
+ <li
135
+ className="item"
136
+ name="Period"
137
+ onClick={[Function]}
138
+ onMouseLeave={[Function]}
139
+ onMouseOver={[Function]}
140
+ style={Object {}}
194
141
  >
195
142
  <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
- }
143
+ className="label"
144
+ data-test="undefined-button-pe"
145
+ tabIndex={0}
219
146
  >
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
- }
147
+ <div
148
+ className="iconWrapper"
149
+ >
150
+ <SvgClock16
151
+ className="fixedDimensionIcon"
152
+ />
153
+ </div>
154
+ <div
155
+ className="labelWrapper"
230
156
  >
231
- Period
232
- </span>
233
- <RecommendedIcon
234
- dataTest="undefined-recommended-icon"
235
- isRecommended={false}
236
- />
157
+ <span
158
+ className="labelText"
159
+ >
160
+ <span
161
+ data-dimensionid="pe"
162
+ >
163
+ Period
164
+ </span>
165
+ </span>
166
+ <RecommendedIcon
167
+ dataTest="undefined-recommended-icon"
168
+ isRecommended={false}
169
+ />
170
+ </div>
237
171
  </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>
172
+ <div
173
+ className="optionsWrapper"
174
+ data-test="undefined-menu-pe"
175
+ />
176
+ </li>
177
+ <style />
178
+ </Fragment>
251
179
  `;
252
180
 
253
181
  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}
182
+ <Fragment>
183
+ <CssVariables
184
+ colors={true}
185
+ elevations={false}
186
+ layers={false}
187
+ spacers={false}
188
+ theme={false}
189
+ />
190
+ <li
191
+ className="item"
192
+ name="Period"
193
+ onClick={[Function]}
194
+ onMouseLeave={[Function]}
195
+ onMouseOver={[Function]}
196
+ style={Object {}}
281
197
  >
282
198
  <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
- }
199
+ className="label"
200
+ data-test="undefined-button-pe"
201
+ tabIndex={0}
306
202
  >
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
- }
203
+ <div
204
+ className="iconWrapper"
205
+ >
206
+ <SvgClock16
207
+ className="fixedDimensionIcon"
208
+ />
209
+ </div>
210
+ <div
211
+ className="labelWrapper"
317
212
  >
318
- Period
319
- </span>
320
- <RecommendedIcon
321
- dataTest="undefined-recommended-icon"
322
- isRecommended={true}
323
- />
213
+ <span
214
+ className="labelText"
215
+ >
216
+ <span
217
+ data-dimensionid="pe"
218
+ >
219
+ Period
220
+ </span>
221
+ </span>
222
+ <RecommendedIcon
223
+ dataTest="undefined-recommended-icon"
224
+ isRecommended={true}
225
+ />
226
+ </div>
324
227
  </div>
325
- </div>
326
- </li>
228
+ </li>
229
+ <style />
230
+ </Fragment>
327
231
  `;
328
232
 
329
233
  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}
234
+ <Fragment>
235
+ <CssVariables
236
+ colors={true}
237
+ elevations={false}
238
+ layers={false}
239
+ spacers={false}
240
+ theme={false}
241
+ />
242
+ <li
243
+ className="item selected"
244
+ name="Period"
245
+ onClick={[Function]}
246
+ onMouseLeave={[Function]}
247
+ onMouseOver={[Function]}
248
+ style={Object {}}
359
249
  >
360
250
  <div
361
- style={
362
- Object {
363
- "display": "flex",
364
- "flexDirection": "column",
365
- "padding": "3px 8px 0 8px",
366
- }
367
- }
251
+ className="label"
252
+ data-test="undefined-button-pe"
253
+ tabIndex={0}
368
254
  >
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
- }
255
+ <div
256
+ className="iconWrapper"
257
+ >
258
+ <SvgClock16
259
+ className="fixedDimensionIcon"
260
+ />
261
+ </div>
262
+ <div
263
+ className="labelWrapper"
395
264
  >
396
- Period
397
- </span>
398
- <RecommendedIcon
399
- dataTest="undefined-recommended-icon"
400
- isRecommended={false}
401
- />
265
+ <span
266
+ className="labelText"
267
+ >
268
+ <span
269
+ data-dimensionid="pe"
270
+ >
271
+ Period
272
+ </span>
273
+ </span>
274
+ <RecommendedIcon
275
+ dataTest="undefined-recommended-icon"
276
+ isRecommended={false}
277
+ />
278
+ </div>
402
279
  </div>
403
- </div>
404
- </li>
280
+ </li>
281
+ <style />
282
+ </Fragment>
405
283
  `;