@dhis2/analytics 26.6.9 → 26.6.11

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 (27) 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/cjs/locales/index.js +20 -18
  12. package/build/cjs/locales/lo/translations.json +199 -199
  13. package/build/cjs/locales/th/translations.json +384 -0
  14. package/build/es/__demo__/DimensionsPanel.stories.js +1 -0
  15. package/build/es/assets/DynamicDimensionIcon.js +12 -38
  16. package/build/es/components/DimensionsPanel/List/DimensionItem.js +50 -34
  17. package/build/es/components/DimensionsPanel/List/OptionsButton.js +7 -6
  18. package/build/es/components/DimensionsPanel/List/RecommendedIcon.js +1 -2
  19. package/build/es/components/DimensionsPanel/List/__tests__/__snapshots__/DimensionItem.spec.js.snap +239 -361
  20. package/build/es/components/DimensionsPanel/List/styles/DimensionItem.style.js +4 -66
  21. package/build/es/components/DimensionsPanel/List/styles/DimensionList.style.js +2 -2
  22. package/build/es/components/DimensionsPanel/List/styles/RecommendedIcon.style.js +4 -4
  23. package/build/es/components/DimensionsPanel/styles/DimensionsPanel.style.js +1 -1
  24. package/build/es/locales/index.js +2 -0
  25. package/build/es/locales/lo/translations.json +199 -199
  26. package/build/es/locales/th/translations.json +384 -0
  27. package/package.json +2 -2
@@ -0,0 +1,384 @@
1
+ {
2
+ "view only": "สำหรับดูเท่านั้น",
3
+ "view and edit": "ดู และ แก้ไข",
4
+ "all users ({{accessLevel}})": "ผู้ใช้ทั้งหมด ( {{accessLevel}} )",
5
+ "{{userOrGroup}} ({{accessLevel}})": "{{userOrGroup}} ( {{accessLevel}} )",
6
+ "Shared with {{commaSeparatedListOfUsersAndGroups}}": "แชร์กับ {{commaSeparatedListOfUsersAndGroups}} ",
7
+ "Not shared with any users or groups": "",
8
+ "No description": "",
9
+ "Last updated {{time}}": "",
10
+ "Created {{time}} by {{author}}": "",
11
+ "Created {{time}}": "",
12
+ "Viewed {{count}} times": "",
13
+ "Notifications": "",
14
+ "You're subscribed and getting updates about new interpretations.": "",
15
+ "Unsubscribe": "",
16
+ "Subscribe to get updates about new interpretations.": "",
17
+ "Subscribe": "",
18
+ "About this map": "",
19
+ "About this line list": "",
20
+ "About this visualization": "",
21
+ "This app could not retrieve required data.": "",
22
+ "Network error": "",
23
+ "Data / Edit calculation": "",
24
+ "Data / New calculation": "",
25
+ "Remove item": "",
26
+ "Check formula": "",
27
+ "Calculation name": "",
28
+ "Shown in table headers and chart axes/legends": "",
29
+ "Delete calculation": "",
30
+ "Cancel": "",
31
+ "The calculation can only be saved with a valid formula": "",
32
+ "Add a name to save this calculation": "",
33
+ "Save calculation": "",
34
+ "Are you sure you want to delete this calculation? It may be used by other visualizations.": "",
35
+ "Yes, delete": "",
36
+ "Totals only": "",
37
+ "Details only": "",
38
+ "Loading": "",
39
+ "Data elements": "",
40
+ "Search by data element name": "",
41
+ "No data elements found for \"{{- searchTerm}}\"": "",
42
+ "No data elements found": "",
43
+ "Drag items here, or double click in the list, to start building a calculation formula": "",
44
+ "Math operators": "",
45
+ "Data Type": "",
46
+ "Only {{dataType}} can be used in {{visType}}": "",
47
+ "All types": "",
48
+ "Disaggregation": "",
49
+ "No data": "",
50
+ "Search by data item name": "",
51
+ "No items selected": "",
52
+ "Selected Items": "",
53
+ "No indicators found": "",
54
+ "No data sets found": "",
55
+ "No event data items found": "",
56
+ "No program indicators found": "",
57
+ "No calculations found": "",
58
+ "No indicators found for \"{{- searchTerm}}\"": "",
59
+ "No data sets found for \"{{- searchTerm}}\"": "",
60
+ "No event data items found for \"{{- searchTerm}}\"": "",
61
+ "No program indicators found for \"{{- searchTerm}}\"": "",
62
+ "No calculations found for \"{{- searchTerm}}\"": "",
63
+ "Nothing found for \"{{- searchTerm}}\"": "",
64
+ "Calculation": "",
65
+ "Metric type": "",
66
+ "All metrics": "",
67
+ "Move to {{axisName}}": "",
68
+ "Add to {{axisName}}": "",
69
+ "Not available for {{visualizationType}}": "",
70
+ "Remove Assigned Categories": "",
71
+ "Add Assigned Categories": "",
72
+ "Remove": "",
73
+ "Filter dimensions": "",
74
+ "Main dimensions": "",
75
+ "Your dimensions": "",
76
+ "Dimension recommended with selected data": "",
77
+ "All items": "",
78
+ "Automatically include all items": "",
79
+ "Select all {{- dimensionTitle}} items. With this option, new items added in the future will be automatically included.": "",
80
+ "Manually select items...": "",
81
+ "Nothing found in {{- dimensionTitle}}": "",
82
+ "Search": "",
83
+ "Nothing found for {{- searchTerm}}": "",
84
+ "Delete {{fileType}}": "",
85
+ "This {{fileType}} and related interpretations will be deleted. Continue?": "",
86
+ "Delete": "",
87
+ "File": "",
88
+ "New": "",
89
+ "Open…": "",
90
+ "Save": "",
91
+ "Save…": "",
92
+ "Save as…": "",
93
+ "Rename…": "",
94
+ "Translate…": "",
95
+ "Share…": "",
96
+ "Get link…": "",
97
+ "Open in this app": "",
98
+ "Close": "",
99
+ "Rename {{fileType}}": "",
100
+ "Name": "",
101
+ "Description": "",
102
+ "Rename": "",
103
+ "{{- objectName}} (copy)": "",
104
+ "Save {{fileType}} as": "",
105
+ "event report": "",
106
+ "line list": "",
107
+ "map": "",
108
+ "visualization": "",
109
+ "Edit": "",
110
+ "Write a reply": "",
111
+ "Post reply": "",
112
+ "Delete failed": "",
113
+ "Could not update comment": "",
114
+ "Enter comment text": "",
115
+ "Update": "",
116
+ "Viewing interpretation: {{- visualisationName}}": "",
117
+ "Could not load interpretation": "",
118
+ "The interpretation couldn’t be displayed. Try again or contact your system administrator.": "",
119
+ "Hide interpretation": "",
120
+ "Write an interpretation": "",
121
+ "Other people viewing this interpretation in the future may see more data.": "",
122
+ "Post interpretation": "",
123
+ "Interpretations": "",
124
+ "Reply": "",
125
+ "{{count}} replies": "",
126
+ "View replies": "",
127
+ "Unlike": "",
128
+ "Like": "",
129
+ "See interpretation": "",
130
+ "Open in app": "",
131
+ "Share": "",
132
+ "Manage sharing": "",
133
+ "Could not update interpretation": "",
134
+ "Enter interpretation text": "",
135
+ "Bold text": "",
136
+ "Italic text": "",
137
+ "Link to a URL": "",
138
+ "Mention a user": "",
139
+ "Add emoji": "",
140
+ "Preview": "",
141
+ "Back to write mode": "",
142
+ "Too many results. Try refining the search.": "",
143
+ "Search for a user": "",
144
+ "Searching for \"{{- searchText}}\"": "",
145
+ "No results found": "",
146
+ "Not available offline": "",
147
+ "Created by": "",
148
+ "Anyone": "",
149
+ "Only you": "",
150
+ "Others": "",
151
+ "Not supported by this app yet": "",
152
+ "Filter by name": "",
153
+ "Created": "",
154
+ "Last updated": "",
155
+ "Type": "",
156
+ "Clear filters": "",
157
+ "{{firstItemIndex}}-{{lastItemIndex}} of {{totalNumberOfItems}}": "",
158
+ "Open": "",
159
+ "Couldn't load items": "",
160
+ "There was a problem loading items. Try again or contact your system administrator.": "",
161
+ "No items found. Create a new to get started.": "",
162
+ "No items found. Try adjusting your search or filter options to find what you're looking for.": "",
163
+ "Create new": "",
164
+ "Open a visualization": "",
165
+ "Loading visualizations": "",
166
+ "Couldn't load visualizations": "",
167
+ "There was a problem loading visualizations. Try again or contact your system administrator.": "",
168
+ "No visualizations found. Click New visualization to get started.": "",
169
+ "No visualizations found. Try adjusting your search or filter options to find what you're looking for.": "",
170
+ "New visualization": "",
171
+ "Open a map": "",
172
+ "Loading maps": "",
173
+ "Couldn't load maps": "",
174
+ "There was a problem loading maps. Try again or contact your system administrator.": "",
175
+ "No maps found. Click New map to get started.": "",
176
+ "No maps found. Try adjusting your search or filter options to find what you're looking for.": "",
177
+ "New map": "",
178
+ "Open a line list": "",
179
+ "Loading line lists": "",
180
+ "Couldn't load line lists": "",
181
+ "There was a problem loading line lists. Try again or contact your system administrator.": "",
182
+ "No line lists found. Click New line list to get started.": "",
183
+ "No line lists found. Try adjusting your search or filter options to find what you're looking for.": "",
184
+ "New line list": "",
185
+ "Options": "",
186
+ "Hide": "",
187
+ "{{count}} org units": "",
188
+ "{{count}} levels": "",
189
+ "{{count}} groups": "",
190
+ "Selected: {{commaSeparatedListOfOrganisationUnits}}": "",
191
+ "Nothing selected": "",
192
+ "User organisation unit": "",
193
+ "User sub-units": "",
194
+ "User sub-x2-units": "",
195
+ "Select a level": "",
196
+ "Select a group": "",
197
+ "Deselect all": "",
198
+ "Period type": "",
199
+ "Year": "",
200
+ "Select year": "",
201
+ "Period": "",
202
+ "Selected Periods": "",
203
+ "Relative periods": "",
204
+ "Fixed periods": "",
205
+ "No periods selected": "",
206
+ "Daily": "",
207
+ "Weekly": "",
208
+ "Weekly (Start Wednesday)": "",
209
+ "Weekly (Start Thursday)": "",
210
+ "Weekly (Start Saturday)": "",
211
+ "Weekly (Start Sunday)": "",
212
+ "Bi-weekly": "",
213
+ "Monthly": "",
214
+ "Bi-monthly": "",
215
+ "Quarterly": "",
216
+ "Six-monthly": "",
217
+ "Six-monthly April": "",
218
+ "Yearly": "",
219
+ "Financial year (Start November)": "",
220
+ "Financial year (Start October)": "",
221
+ "Financial year (Start July)": "",
222
+ "Financial year (Start April)": "",
223
+ "Today": "",
224
+ "Yesterday": "",
225
+ "Last 3 days": "",
226
+ "Last 7 days": "",
227
+ "Last 14 days": "",
228
+ "Last 30 days": "",
229
+ "Last 60 days": "",
230
+ "Last 90 days": "",
231
+ "Last 180 days": "",
232
+ "This week": "",
233
+ "Last week": "",
234
+ "Last 4 weeks": "",
235
+ "Last 12 weeks": "",
236
+ "Last 52 weeks": "",
237
+ "Weeks this year": "",
238
+ "This bi-week": "",
239
+ "Last bi-week": "",
240
+ "Last 4 bi-weeks": "",
241
+ "This month": "",
242
+ "Last month": "",
243
+ "Last 3 months": "",
244
+ "Last 6 months": "",
245
+ "Last 12 months": "",
246
+ "Months this year": "",
247
+ "This bi-month": "",
248
+ "Last bi-month": "",
249
+ "Last 6 bi-months": "",
250
+ "Bi-months this year": "",
251
+ "This quarter": "",
252
+ "Last quarter": "",
253
+ "Last 4 quarters": "",
254
+ "Quarters this year": "",
255
+ "This six-month": "",
256
+ "Last six-month": "",
257
+ "Last 2 six-month": "",
258
+ "This financial year": "",
259
+ "Last financial year": "",
260
+ "Last 5 financial years": "",
261
+ "This year": "",
262
+ "Last year": "",
263
+ "Last 5 years": "",
264
+ "Last 10 years": "",
265
+ "Days": "",
266
+ "Weeks": "",
267
+ "Bi-weeks": "",
268
+ "Months": "",
269
+ "Bi-months": "",
270
+ "Quarters": "",
271
+ "Six-months": "",
272
+ "Financial Years": "",
273
+ "Years": "",
274
+ "Interpretations and details": "",
275
+ "Translating to": "",
276
+ "Choose a locale": "",
277
+ "Base locale reference": "",
278
+ "Choose a locale to translate from the menu above": "",
279
+ "Translate: {{objectName}}": "",
280
+ "Save translations": "",
281
+ "Cannot save while offline": "",
282
+ "Could not load translations": "",
283
+ "Retry": "",
284
+ "Series": "",
285
+ "Category": "",
286
+ "Filter": "",
287
+ "Columns": "",
288
+ "Rows": "",
289
+ "Points": "",
290
+ "Reporting rate": "",
291
+ "Reporting rate on time": "",
292
+ "Actual reports": "",
293
+ "Actual reports on time": "",
294
+ "Expected reports": "",
295
+ "Program": "",
296
+ "Select a program": "",
297
+ "Indicators": "",
298
+ "Indicator group": "",
299
+ "All groups": "",
300
+ "Indicator": "",
301
+ "No indicator groups found": "",
302
+ "Loading indicator groups": "",
303
+ "Data element group": "",
304
+ "Data element": "",
305
+ "No data element groups found": "",
306
+ "Loading data element groups": "",
307
+ "Data sets": "",
308
+ "Data set": "",
309
+ "All data sets": "",
310
+ "Loading data sets": "",
311
+ "Event data items": "",
312
+ "All programs": "",
313
+ "Event data item": "",
314
+ "No programs found": "",
315
+ "Loading programs": "",
316
+ "Program indicators": "",
317
+ "Program indicator": "",
318
+ "Calculations": "",
319
+ "Number": "",
320
+ "Formula is empty. Add items to the formula from the lists on the left.": "",
321
+ "Consecutive math operators": "",
322
+ "Consecutive data elements": "",
323
+ "Starts or ends with a math operator": "",
324
+ "Empty parentheses": "",
325
+ "Missing right parenthesis )": "",
326
+ "Missing left parenthesis (": "",
327
+ "Extra Small": "",
328
+ "Small": "",
329
+ "Regular": "",
330
+ "Large": "",
331
+ "Extra Large": "",
332
+ "Left": "",
333
+ "Center": "",
334
+ "Right": "",
335
+ "Start": "",
336
+ "Middle": "",
337
+ "End": "",
338
+ "Top": "",
339
+ "Bottom": "",
340
+ "{{dynamicOuNames}} and {{lastOuName}}": "",
341
+ "{{allDynamicOuNames}} levels": "",
342
+ "{{allDynamicOuNames}} groups": "",
343
+ "{{allDynamicOuNames}} levels in {{staticOuNames}}": "",
344
+ "{{allDynamicOuNames}} groups in {{staticOuNames}}": "",
345
+ "{{percentage}}% of total x values": "",
346
+ "{{percentage}}% of total y values": "",
347
+ "{{thresholdFactor}} × IQR Q1": "",
348
+ "{{thresholdFactor}} × IQR Q3": "",
349
+ "{{thresholdFactor}} × Modified Z-score low": "",
350
+ "{{thresholdFactor}} × Modified Z-score high": "",
351
+ "{{thresholdFactor}} × Z-score low": "",
352
+ "{{thresholdFactor}} × Z-score high": "",
353
+ "Data": "",
354
+ "Organisation unit": "",
355
+ "Assigned Categories": "",
356
+ "Pivot table": "",
357
+ "Area": "",
358
+ "Stacked area": "",
359
+ "Bar": "",
360
+ "Stacked bar": "",
361
+ "Column": "",
362
+ "Year over year (column)": "",
363
+ "Stacked column": "",
364
+ "Gauge": "",
365
+ "Line": "",
366
+ "Line list": "",
367
+ "Year over year (line)": "",
368
+ "Pie": "",
369
+ "Radar": "",
370
+ "Scatter": "",
371
+ "Single value": "",
372
+ "Outlier table": "",
373
+ "All charts": "",
374
+ "{{seriesName}} (trend)": "",
375
+ "Trend": "",
376
+ "No legend for this series": "",
377
+ "and {{amount}} more...": "",
378
+ "Linear Regression": "",
379
+ "Target": "",
380
+ "Base": "",
381
+ "Axis {{axisId}}": "",
382
+ "{{count}} items": "",
383
+ "Reset zoom": ""
384
+ }
@@ -62,6 +62,7 @@ storiesOf('DimensionsPanel', module).add('locked dimension', () => {
62
62
  return /*#__PURE__*/React.createElement(DimensionsPanel, {
63
63
  dimensions: [...fixedDimensions, ...dynamicDimensions],
64
64
  onDimensionClick: onDimensionClick,
65
+ selectedIds: [DIMENSION_ID_DATA],
65
66
  lockedDimension: dimension => dimension === DIMENSION_ID_DATA
66
67
  });
67
68
  });
@@ -1,47 +1,21 @@
1
1
  import React from 'react';
2
2
  const DynamicDimensionIcon = () => {
3
3
  return /*#__PURE__*/React.createElement("svg", {
4
- width: "16px",
5
- height: "16px",
6
- viewBox: "0 0 16 16",
7
- version: "1.1",
8
- xmlns: "http://www.w3.org/2000/svg"
9
- }, /*#__PURE__*/React.createElement("g", {
10
- id: "Exp",
11
- stroke: "none",
12
- strokeWidth: "1",
13
- fill: "none",
14
- fillRule: "evenodd"
15
- }, /*#__PURE__*/React.createElement("g", {
16
- id: "Artboard",
17
- transform: "translate(-80.000000, -9.000000)"
18
- }, /*#__PURE__*/React.createElement("g", {
19
- id: "icon_dimension_new",
20
- transform: "translate(80.000000, 9.000000)"
21
- }, /*#__PURE__*/React.createElement("rect", {
22
- id: "frame",
23
- x: "0",
24
- y: "0",
25
4
  width: "16",
26
- height: "16"
27
- }), /*#__PURE__*/React.createElement("g", {
28
- id: "module",
29
- transform: "translate(4.000000, 4.000000)",
30
- stroke: "#000000",
5
+ height: "16",
6
+ fill: "none",
7
+ xmlns: "http://www.w3.org/2000/svg"
8
+ }, /*#__PURE__*/React.createElement("path", {
9
+ clipRule: "evenodd",
10
+ d: "m4.832 5.674 2.831-1.11a.913.913 0 0 1 .673 0l2.83 1.11a.548.548 0 0 1 .334.517V9.81a.548.548 0 0 1-.332.517l-2.831 1.11a.92.92 0 0 1-.673 0l-2.83-1.11a.548.548 0 0 1-.334-.517V6.19a.548.548 0 0 1 .332-.517Z",
11
+ stroke: "#212934",
31
12
  strokeLinecap: "round",
32
13
  strokeLinejoin: "round"
33
- }, /*#__PURE__*/React.createElement("path", {
34
- d: "M0.33209728,1.1742111 L3.16308174,0.0641666694 C3.37911767,-0.0213888898 3.61963794,-0.0213888898 3.83567387,0.0641666694 L6.66665833,1.1742111 C6.87300668,1.26220739 7.00497003,1.467 6.99984343,1.69127776 L6.99984343,5.30887771 C7.00517859,5.53285411 6.87376309,5.73756106 6.66790272,5.82594437 L3.83691826,6.93629991 C3.62076407,7.02123336 3.38048032,7.02123336 3.16432613,6.93629991 L0.333341668,5.82594437 C0.126993317,5.73794808 -0.00497002591,5.53315547 0.000156574133,5.30887771 L0.000156574133,1.69127776 C-0.00517858533,1.46730136 0.126236906,1.26259441 0.33209728,1.1742111 Z",
35
- id: "Shape"
36
- }), /*#__PURE__*/React.createElement("path", {
37
- d: "M3.5,2.72795833 L0.322,1.48195833",
38
- id: "Shape"
39
- }), /*#__PURE__*/React.createElement("path", {
40
- d: "M3.5,2.72795833 L6.678,1.48195833",
41
- id: "Shape"
42
14
  }), /*#__PURE__*/React.createElement("path", {
43
- d: "M3.5,6.78125 L3.5,2.72795833",
44
- id: "Shape"
45
- }))))));
15
+ d: "M8 7.228 4.822 5.982M8 7.228l3.178-1.246M8 11.281V7.228",
16
+ stroke: "#212934",
17
+ strokeLinecap: "round",
18
+ strokeLinejoin: "round"
19
+ }));
46
20
  };
47
21
  export default DynamicDimensionIcon;
@@ -1,15 +1,17 @@
1
+ import _JSXStyle from "styled-jsx/style";
1
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
3
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
4
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
4
5
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
5
- import { IconLock16 } from '@dhis2/ui';
6
+ import { CssVariables } from '@dhis2/ui';
7
+ import cx from 'classnames';
6
8
  import PropTypes from 'prop-types';
7
9
  import React, { Component, createRef } from 'react';
8
10
  import DynamicDimensionIcon from '../../../assets/DynamicDimensionIcon.js';
9
11
  import { DIMENSION_PROP_NO_ITEMS, getPredefinedDimensionProp } from '../../../modules/predefinedDimensions.js';
10
12
  import OptionsButton from './OptionsButton.js';
11
13
  import RecommendedIcon from './RecommendedIcon.js';
12
- import { styles } from './styles/DimensionItem.style.js';
14
+ import styles from './styles/DimensionItem.style.js';
13
15
  class DimensionItem extends Component {
14
16
  constructor() {
15
17
  super(...arguments);
@@ -30,23 +32,18 @@ class DimensionItem extends Component {
30
32
  _defineProperty(this, "getDimensionIcon", () => {
31
33
  const Icon = getPredefinedDimensionProp(this.props.id, 'icon');
32
34
  return Icon ? /*#__PURE__*/React.createElement(Icon, {
33
- style: styles.fixedDimensionIcon
35
+ className: "fixedDimensionIcon"
34
36
  }) : /*#__PURE__*/React.createElement(DynamicDimensionIcon, {
35
- style: styles.dynamicDimensionIcon
37
+ className: "dynamic-dimension-icon"
36
38
  });
37
39
  });
38
40
  _defineProperty(this, "getDimensionType", () => {
39
41
  const {
40
42
  id,
41
- name,
42
- isDeactivated
43
+ name
43
44
  } = this.props;
44
45
  return /*#__PURE__*/React.createElement("span", {
45
- "data-dimensionid": id,
46
- style: {
47
- ...styles.text,
48
- ...(isDeactivated ? styles.textDeactivated : {})
49
- }
46
+ "data-dimensionid": id
50
47
  }, name);
51
48
  });
52
49
  }
@@ -60,51 +57,70 @@ class DimensionItem extends Component {
60
57
  onClick,
61
58
  onOptionsClick,
62
59
  innerRef,
63
- style,
64
60
  dataTest,
61
+ className,
65
62
  ...rest
66
63
  } = this.props;
67
64
  const Icon = this.getDimensionIcon();
68
65
  const Label = this.getDimensionType();
69
- const itemStyle = isSelected && !isDeactivated ? {
70
- ...styles.item,
71
- ...styles.selected
72
- } : styles.item;
73
66
  const optionsRef = /*#__PURE__*/createRef();
67
+ const LockIcon = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
68
+ className: `jsx-${styles.__hash}` + " " + "lockWrapper"
69
+ }, /*#__PURE__*/React.createElement("svg", {
70
+ width: "7",
71
+ height: "9",
72
+ fill: "none",
73
+ xmlns: "http://www.w3.org/2000/svg",
74
+ className: `jsx-${styles.__hash}`
75
+ }, /*#__PURE__*/React.createElement("path", {
76
+ fillRule: "evenodd",
77
+ clipRule: "evenodd",
78
+ 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",
79
+ fill: "none",
80
+ className: `jsx-${styles.__hash}`
81
+ }))), /*#__PURE__*/React.createElement(_JSXStyle, {
82
+ id: styles.__hash
83
+ }, styles));
74
84
  const onLabelClick = () => {
75
85
  if (!isDeactivated && !getPredefinedDimensionProp(id, DIMENSION_PROP_NO_ITEMS)) {
76
86
  onClick(id);
77
87
  }
78
88
  };
79
- return /*#__PURE__*/React.createElement("li", _extends({
89
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CssVariables, {
90
+ colors: true
91
+ }), /*#__PURE__*/React.createElement("li", _extends({
80
92
  onMouseOver: this.onMouseOver,
81
93
  onMouseLeave: this.onMouseExit,
82
94
  ref: innerRef,
83
- style: Object.assign({}, itemStyle, style, !isDeactivated && styles.clickable),
84
95
  "data-test": dataTest,
85
96
  onClick: onLabelClick
86
- }, rest), /*#__PURE__*/React.createElement("div", {
87
- className: "label",
97
+ }, rest, {
98
+ className: `jsx-${styles.__hash}` + " " + (rest && rest.className != null && rest.className || cx('item', {
99
+ deactivated: isDeactivated,
100
+ selected: isSelected && !isDeactivated
101
+ }, className) || "")
102
+ }), /*#__PURE__*/React.createElement("div", {
88
103
  tabIndex: 0,
89
- style: styles.label,
90
- "data-test": `${dataTest}-button-${id}`
104
+ "data-test": `${dataTest}-button-${id}`,
105
+ className: `jsx-${styles.__hash}` + " " + "label"
91
106
  }, /*#__PURE__*/React.createElement("div", {
92
- style: styles.iconWrapper
107
+ className: `jsx-${styles.__hash}` + " " + "iconWrapper"
93
108
  }, Icon), /*#__PURE__*/React.createElement("div", {
94
- style: styles.labelWrapper
95
- }, Label, /*#__PURE__*/React.createElement(RecommendedIcon, {
109
+ className: `jsx-${styles.__hash}` + " " + "labelWrapper"
110
+ }, /*#__PURE__*/React.createElement("span", {
111
+ className: `jsx-${styles.__hash}` + " " + "labelText"
112
+ }, Label), /*#__PURE__*/React.createElement(RecommendedIcon, {
96
113
  isRecommended: isRecommended,
97
114
  dataTest: `${dataTest}-recommended-icon`
98
- })), isLocked && /*#__PURE__*/React.createElement("div", {
99
- style: styles.iconWrapper
100
- }, /*#__PURE__*/React.createElement(IconLock16, null))), onOptionsClick ? /*#__PURE__*/React.createElement("div", {
101
- style: styles.optionsWrapper,
115
+ }))), onOptionsClick && !isDeactivated && !isLocked ? /*#__PURE__*/React.createElement("div", {
102
116
  ref: optionsRef,
103
- "data-test": `${dataTest}-menu-${id}`
104
- }, this.state.mouseOver && !isDeactivated && !isLocked ? /*#__PURE__*/React.createElement(OptionsButton, {
105
- style: styles.optionsButton,
117
+ "data-test": `${dataTest}-menu-${id}`,
118
+ className: `jsx-${styles.__hash}` + " " + "optionsWrapper"
119
+ }, this.state.mouseOver ? /*#__PURE__*/React.createElement(OptionsButton, {
106
120
  onClick: this.onOptionsClick(id, optionsRef)
107
- }) : null) : null);
121
+ }) : null) : null, isLocked && LockIcon), /*#__PURE__*/React.createElement(_JSXStyle, {
122
+ id: styles.__hash
123
+ }, styles));
108
124
  }
109
125
  }
110
126
  DimensionItem.propTypes = {
@@ -112,12 +128,12 @@ DimensionItem.propTypes = {
112
128
  isSelected: PropTypes.bool.isRequired,
113
129
  // XXX
114
130
  name: PropTypes.string.isRequired,
131
+ className: PropTypes.string,
115
132
  dataTest: PropTypes.string,
116
133
  innerRef: PropTypes.func,
117
134
  isDeactivated: PropTypes.bool,
118
135
  isLocked: PropTypes.bool,
119
136
  isRecommended: PropTypes.bool,
120
- style: PropTypes.object,
121
137
  onClick: PropTypes.func,
122
138
  onOptionsClick: PropTypes.func
123
139
  };
@@ -1,18 +1,19 @@
1
+ import _JSXStyle from "styled-jsx/style";
1
2
  import { IconMore16 } from '@dhis2/ui';
2
3
  import PropTypes from 'prop-types';
3
4
  import React from 'react';
4
5
  const OptionsButton = _ref => {
5
6
  let {
6
- style,
7
7
  onClick
8
8
  } = _ref;
9
- return /*#__PURE__*/React.createElement("button", {
10
- style: style,
11
- onClick: onClick
12
- }, /*#__PURE__*/React.createElement(IconMore16, null));
9
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("button", {
10
+ onClick: onClick,
11
+ className: "jsx-2728765288"
12
+ }, /*#__PURE__*/React.createElement(IconMore16, null)), /*#__PURE__*/React.createElement(_JSXStyle, {
13
+ id: "2728765288"
14
+ }, ["button.jsx-2728765288{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;height:20px;width:20px;padding:0;border:none;background:none;outline:none;cursor:pointer;border-top-right-radius:2px;border-bottom-left-radius:2px;}", "button.jsx-2728765288:hover{background-color:rgba(0,0,0,0.09);}"]));
13
15
  };
14
16
  OptionsButton.propTypes = {
15
- style: PropTypes.object,
16
17
  onClick: PropTypes.func
17
18
  };
18
19
  export default OptionsButton;
@@ -10,8 +10,7 @@ const RecommendedIcon = _ref => {
10
10
  } = _ref;
11
11
  return isRecommended ? /*#__PURE__*/React.createElement(Tooltip, {
12
12
  content: i18n.t('Dimension recommended with selected data'),
13
- placement: "bottom",
14
- maxWidth: 160
13
+ placement: "bottom"
15
14
  }, /*#__PURE__*/React.createElement("div", {
16
15
  style: styles.recommendedIcon,
17
16
  "data-test": dataTest