@cdc/core 4.24.5 → 4.24.9-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.
Files changed (109) hide show
  1. package/assets/icon-gear-multi.svg +23 -0
  2. package/components/AdvancedEditor/AdvancedEditor.tsx +93 -0
  3. package/components/AdvancedEditor/advanced-editor-styles.css +3 -0
  4. package/components/AdvancedEditor/index.ts +1 -0
  5. package/components/Alert/components/Alert.styles.css +15 -0
  6. package/components/Alert/components/Alert.tsx +39 -0
  7. package/components/Alert/index.tsx +3 -0
  8. package/components/DataTable/DataTable.tsx +127 -32
  9. package/components/DataTable/DataTableStandAlone.tsx +4 -25
  10. package/components/DataTable/components/DataTableEditorPanel.tsx +4 -4
  11. package/components/DataTable/components/ExpandCollapse.tsx +1 -1
  12. package/components/DataTable/helpers/chartCellMatrix.tsx +6 -12
  13. package/components/DataTable/helpers/getChartCellValue.ts +9 -5
  14. package/components/DataTable/helpers/getDataSeriesColumns.ts +10 -7
  15. package/components/DataTable/helpers/getRowType.ts +6 -0
  16. package/components/DataTable/helpers/mapCellMatrix.tsx +3 -3
  17. package/components/DataTable/types/TableConfig.ts +2 -1
  18. package/components/EditorPanel/ColumnsEditor.tsx +3 -30
  19. package/components/EditorPanel/DataTableEditor.tsx +66 -22
  20. package/components/EditorPanel/FieldSetWrapper.tsx +51 -0
  21. package/components/EditorPanel/FootnotesEditor.tsx +77 -0
  22. package/components/EditorPanel/Inputs.tsx +13 -4
  23. package/components/EditorPanel/VizFilterEditor/NestedDropdownEditor.tsx +268 -0
  24. package/components/EditorPanel/VizFilterEditor/VizFilterEditor.tsx +306 -0
  25. package/components/EditorPanel/VizFilterEditor/components/FilterOrder.tsx +40 -0
  26. package/components/EditorPanel/VizFilterEditor/index.ts +1 -0
  27. package/components/EditorWrapper/EditorWrapper.tsx +3 -4
  28. package/components/EditorWrapper/index.ts +1 -0
  29. package/components/Filters.tsx +520 -0
  30. package/components/Footnotes/Footnotes.tsx +25 -0
  31. package/components/Footnotes/FootnotesStandAlone.tsx +45 -0
  32. package/components/Footnotes/footnotes.css +5 -0
  33. package/components/Footnotes/index.ts +1 -0
  34. package/components/Layout/components/Responsive.tsx +14 -4
  35. package/components/Layout/components/Sidebar/components/Sidebar.tsx +14 -5
  36. package/components/Layout/components/Sidebar/components/sidebar.styles.scss +23 -20
  37. package/components/Layout/components/Visualization/index.tsx +19 -6
  38. package/components/Layout/components/Visualization/visualizations.scss +32 -26
  39. package/components/Layout/styles/editor.scss +0 -8
  40. package/components/Legend/Legend.Gradient.tsx +133 -0
  41. package/components/LegendShape.tsx +28 -0
  42. package/components/MultiSelect/MultiSelect.tsx +41 -11
  43. package/components/MultiSelect/multiselect.styles.css +0 -3
  44. package/components/NestedDropdown/NestedDropdown.tsx +47 -52
  45. package/components/NestedDropdown/nesteddropdown.styles.css +19 -25
  46. package/components/Table/Table.tsx +8 -5
  47. package/components/Table/components/Cell.tsx +2 -2
  48. package/components/Table/components/Row.tsx +25 -7
  49. package/components/_stories/Footnotes.stories.tsx +17 -0
  50. package/components/_stories/Layout.Debug.stories.tsx +91 -0
  51. package/components/_stories/_mocks/bar-chart-suppressed.json +474 -0
  52. package/components/_stories/styles.scss +14 -1
  53. package/components/createBarElement.jsx +4 -4
  54. package/components/inputs/InputSelect.tsx +17 -6
  55. package/components/ui/Icon.tsx +22 -16
  56. package/components/ui/Title/Title.scss +0 -8
  57. package/helpers/DataTransform.ts +2 -2
  58. package/helpers/addValuesToFilters.ts +135 -0
  59. package/helpers/cove/accessibility.ts +17 -4
  60. package/helpers/cove/fontSettings.ts +2 -0
  61. package/helpers/coveUpdateWorker.ts +30 -9
  62. package/helpers/filterVizData.ts +49 -0
  63. package/helpers/formatConfigBeforeSave.ts +110 -0
  64. package/helpers/gatherQueryParams.ts +24 -7
  65. package/helpers/getGradientLegendWidth.ts +15 -0
  66. package/helpers/getTextWidth.ts +18 -0
  67. package/helpers/lineChartHelpers.js +2 -1
  68. package/helpers/pivotData.ts +18 -0
  69. package/helpers/queryStringUtils.ts +29 -0
  70. package/helpers/scaling.ts +7 -0
  71. package/helpers/tests/addValuesToFilters.test.ts +55 -0
  72. package/helpers/tests/filterVizData.test.ts +31 -0
  73. package/helpers/tests/gatherQueryParams.test.ts +22 -0
  74. package/helpers/tests/invertValue.test.ts +35 -0
  75. package/helpers/tests/updateFieldFactory.test.ts +1 -0
  76. package/helpers/updateFieldFactory.ts +1 -1
  77. package/helpers/updatePaletteNames.ts +19 -0
  78. package/helpers/{useDataVizClasses.js → useDataVizClasses.ts} +3 -2
  79. package/helpers/ver/4.24.5.ts +3 -3
  80. package/helpers/ver/4.24.7.ts +123 -0
  81. package/helpers/ver/4.24.9.ts +63 -0
  82. package/helpers/ver/tests/4.24.9.test.ts +22 -0
  83. package/helpers/ver/versionNeedsUpdate.ts +9 -0
  84. package/package.json +6 -4
  85. package/styles/_button-section.scss +7 -2
  86. package/styles/_data-table.scss +0 -1
  87. package/styles/_global.scss +6 -2
  88. package/styles/base.scss +4 -0
  89. package/styles/filters.scss +4 -0
  90. package/styles/v2/themes/_color-definitions.scss +1 -0
  91. package/types/Annotation.ts +46 -0
  92. package/types/Axis.ts +3 -2
  93. package/types/ConfigureData.ts +1 -1
  94. package/types/Dimensions.ts +1 -0
  95. package/types/Footnotes.ts +17 -0
  96. package/types/General.ts +5 -0
  97. package/types/Runtime.ts +2 -7
  98. package/types/Table.ts +6 -0
  99. package/types/Visualization.ts +31 -9
  100. package/types/VizFilter.ts +39 -7
  101. package/components/AdvancedEditor.jsx +0 -74
  102. package/components/EditorPanel/VizFilterEditor.tsx +0 -234
  103. package/components/Filters.jsx +0 -461
  104. package/components/LegendCircle.jsx +0 -17
  105. package/helpers/queryStringUtils.js +0 -26
  106. package/helpers/updatePaletteNames.js +0 -16
  107. package/types/BaseVisualizationType.ts +0 -1
  108. /package/components/{Waiting.jsx → Waiting.tsx} +0 -0
  109. /package/helpers/ver/{4.23.4.ts → 4.24.4.ts} +0 -0
@@ -0,0 +1,474 @@
1
+ {
2
+ "type": "chart",
3
+ "debugSvg": false,
4
+ "chartMessage": {
5
+ "noData": "No Data Available"
6
+ },
7
+ "title": "Combo Bar-Line Chart",
8
+ "showTitle": true,
9
+ "showDownloadMediaButton": false,
10
+ "theme": "theme-purple",
11
+ "animate": false,
12
+ "fontSize": "medium",
13
+ "lineDatapointStyle": "hover",
14
+ "lineDatapointColor": "Same as Line",
15
+ "barHasBorder": "false",
16
+ "isLollipopChart": false,
17
+ "lollipopShape": "circle",
18
+ "lollipopColorStyle": "two-tone",
19
+ "visualizationSubType": "regular",
20
+ "barStyle": "",
21
+ "roundingStyle": "standard",
22
+ "tipRounding": "top",
23
+ "isResponsiveTicks": false,
24
+ "general": {
25
+ "showDownloadButton": false
26
+ },
27
+ "padding": {
28
+ "left": 5,
29
+ "right": 5
30
+ },
31
+ "preliminaryData": [
32
+ {
33
+ "type": "suppression",
34
+ "seriesKey": "",
35
+ "label": "Suppressed",
36
+ "column": "Data 2",
37
+ "value": "ABC",
38
+ "style": "",
39
+ "displayTooltip": true,
40
+ "displayLegend": true,
41
+ "displayTable": true,
42
+ "symbol": "Dagger",
43
+ "iconCode": "†",
44
+ "lineCode": ""
45
+ }
46
+ ],
47
+ "yAxis": {
48
+ "hideAxis": false,
49
+ "displayNumbersOnBar": false,
50
+ "hideLabel": false,
51
+ "hideTicks": false,
52
+ "size": "68",
53
+ "gridLines": true,
54
+ "enablePadding": false,
55
+ "min": "",
56
+ "max": "",
57
+ "labelColor": "#333",
58
+ "tickLabelColor": "#333",
59
+ "tickColor": "#333",
60
+ "rightHideAxis": true,
61
+ "rightAxisSize": 50,
62
+ "rightLabel": "",
63
+ "rightLabelOffsetSize": 0,
64
+ "rightAxisLabelColor": "#333",
65
+ "rightAxisTickLabelColor": "#333",
66
+ "rightAxisTickColor": "#333",
67
+ "numTicks": "",
68
+ "axisPadding": 0,
69
+ "scalePadding": 10,
70
+ "tickRotation": 0,
71
+ "anchors": [],
72
+ "label": "Y-Axis Label Example"
73
+ },
74
+ "boxplot": {
75
+ "plots": [],
76
+ "borders": "true",
77
+ "firstQuartilePercentage": 25,
78
+ "thirdQuartilePercentage": 75,
79
+ "boxWidthPercentage": 40,
80
+ "plotOutlierValues": false,
81
+ "plotNonOutlierValues": true,
82
+ "legend": {
83
+ "showHowToReadText": false,
84
+ "howToReadText": ""
85
+ },
86
+ "labels": {
87
+ "q1": "Lower Quartile",
88
+ "q2": "q2",
89
+ "q3": "Upper Quartile",
90
+ "q4": "q4",
91
+ "minimum": "Minimum",
92
+ "maximum": "Maximum",
93
+ "mean": "Mean",
94
+ "median": "Median",
95
+ "sd": "Standard Deviation",
96
+ "iqr": "Interquartile Range",
97
+ "total": "Total",
98
+ "outliers": "Outliers",
99
+ "values": "Values"
100
+ }
101
+ },
102
+ "topAxis": {
103
+ "hasLine": false
104
+ },
105
+ "isLegendValue": false,
106
+ "barThickness": 0.35,
107
+ "barHeight": 25,
108
+ "barSpace": 15,
109
+ "heights": {
110
+ "vertical": 300,
111
+ "horizontal": 750
112
+ },
113
+ "xAxis": {
114
+ "sortDates": false,
115
+ "anchors": [],
116
+ "type": "date",
117
+ "showTargetLabel": true,
118
+ "targetLabel": "Target",
119
+ "hideAxis": false,
120
+ "hideLabel": false,
121
+ "hideTicks": false,
122
+ "size": "78",
123
+ "tickRotation": "25",
124
+ "min": "",
125
+ "max": "",
126
+ "labelColor": "#333",
127
+ "tickLabelColor": "#333",
128
+ "tickColor": "#333",
129
+ "numTicks": "",
130
+ "labelOffset": 65,
131
+ "axisPadding": 0,
132
+ "target": 0,
133
+ "maxTickRotation": 0,
134
+ "showSuppressedSymbol": true,
135
+ "showSuppressedLine": true,
136
+ "dataKey": "Date",
137
+ "label": "X-Axis Example Label",
138
+ "dateParseFormat": "%d/%m/%Y",
139
+ "dateDisplayFormat": "%d/%m/%Y",
140
+ "tickWidthMax": 91,
141
+ "padding": 6
142
+ },
143
+ "table": {
144
+ "label": "Data Table",
145
+ "expanded": true,
146
+ "limitHeight": false,
147
+ "height": "",
148
+ "caption": "",
149
+ "showDownloadUrl": false,
150
+ "showDataTableLink": true,
151
+ "indexLabel": "",
152
+ "download": true,
153
+ "showVertical": false,
154
+ "dateDisplayFormat": "",
155
+ "show": true
156
+ },
157
+ "orientation": "vertical",
158
+ "color": "pinkpurple",
159
+ "columns": {},
160
+ "legend": {
161
+ "hide": false,
162
+ "behavior": "highlight",
163
+ "axisAlign": true,
164
+ "singleRow": false,
165
+ "colorCode": "",
166
+ "reverseLabelOrder": false,
167
+ "description": "",
168
+ "dynamicLegend": false,
169
+ "dynamicLegendDefaultText": "Show All",
170
+ "dynamicLegendItemLimit": 5,
171
+ "dynamicLegendItemLimitMessage": "Dynamic Legend Item Limit Hit.",
172
+ "dynamicLegendChartMessage": "Select Options from the Legend",
173
+ "lineMode": false,
174
+ "verticalSorted": false,
175
+ "highlightOnHover": false,
176
+ "hideSuppressedLabels": false,
177
+ "seriesHighlight": [],
178
+ "position": "right",
179
+ "label": "Data Type"
180
+ },
181
+ "brush": {
182
+ "height": 25,
183
+ "active": false,
184
+ "data": [
185
+ {
186
+ "Date": "1/15/2016",
187
+ "Data 1": "1000",
188
+ "Data 2": "110",
189
+ "Data 3": "100",
190
+ "Data 4": "90",
191
+ "Monthly-Goal": "100"
192
+ },
193
+ {
194
+ "Date": "2/15/2016",
195
+ "Data 1": "100",
196
+ "Data 2": "110",
197
+ "Data 3": "100",
198
+ "Data 4": "100",
199
+ "Monthly-Goal": "100"
200
+ },
201
+ {
202
+ "Date": "3/15/2016",
203
+ "Data 1": "80",
204
+ "Data 2": "90",
205
+ "Data 3": "100",
206
+ "Data 4": "120",
207
+ "Monthly-Goal": "110"
208
+ },
209
+ {
210
+ "Date": "4/15/2016",
211
+ "Data 1": "80",
212
+ "Data 2": "90",
213
+ "Data 3": "110",
214
+ "Data 4": "120",
215
+ "Monthly-Goal": "110"
216
+ },
217
+ {
218
+ "Date": "5/15/2016",
219
+ "Data 1": "70",
220
+ "Data 2": "90",
221
+ "Data 3": "110",
222
+ "Data 4": "130",
223
+ "Monthly-Goal": "120"
224
+ },
225
+ {
226
+ "Date": "6/15/2016",
227
+ "Data 1": "100",
228
+ "Data 2": "120",
229
+ "Data 3": "120",
230
+ "Data 4": "130",
231
+ "Monthly-Goal": "120"
232
+ },
233
+ {
234
+ "Date": "7/15/2016",
235
+ "Data 1": "110",
236
+ "Data 2": "140",
237
+ "Data 3": "120",
238
+ "Data 4": "130",
239
+ "Monthly-Goal": "130"
240
+ },
241
+ {
242
+ "Date": "8/15/2016",
243
+ "Data 1": "110",
244
+ "Data 2": "130",
245
+ "Data 3": "120",
246
+ "Data 4": "140",
247
+ "Monthly-Goal": "130"
248
+ },
249
+ {
250
+ "Date": "9/15/2016",
251
+ "Data 1": "120",
252
+ "Data 2": "130",
253
+ "Data 3": "120",
254
+ "Data 4": "150",
255
+ "Monthly-Goal": "140"
256
+ }
257
+ ]
258
+ },
259
+ "exclusions": {
260
+ "active": false,
261
+ "keys": []
262
+ },
263
+ "palette": "qualitative-soft",
264
+ "isPaletteReversed": false,
265
+ "twoColor": {
266
+ "palette": "monochrome-1",
267
+ "isPaletteReversed": false
268
+ },
269
+ "labels": true,
270
+ "dataFormat": {
271
+ "commas": false,
272
+ "prefix": "",
273
+ "suffix": "",
274
+ "abbreviated": false,
275
+ "bottomSuffix": "",
276
+ "bottomPrefix": "",
277
+ "bottomAbbreviated": false
278
+ },
279
+ "confidenceKeys": {},
280
+ "visual": {
281
+ "border": true,
282
+ "accent": true,
283
+ "background": true,
284
+ "verticalHoverLine": false,
285
+ "horizontalHoverLine": false
286
+ },
287
+ "useLogScale": false,
288
+ "filterBehavior": "Filter Change",
289
+ "highlightedBarValues": [],
290
+ "series": [
291
+ {
292
+ "dataKey": "Data 2",
293
+ "type": "Bar",
294
+ "axis": "Left",
295
+ "tooltip": true
296
+ }
297
+ ],
298
+ "tooltips": {
299
+ "opacity": 90,
300
+ "singleSeries": false,
301
+ "dateDisplayFormat": ""
302
+ },
303
+ "forestPlot": {
304
+ "startAt": 0,
305
+ "colors": {
306
+ "line": "",
307
+ "shape": ""
308
+ },
309
+ "lineOfNoEffect": {
310
+ "show": true
311
+ },
312
+ "type": "",
313
+ "pooledResult": {
314
+ "diamondHeight": 5,
315
+ "column": ""
316
+ },
317
+ "estimateField": "",
318
+ "estimateRadius": "",
319
+ "shape": "",
320
+ "rowHeight": 20,
321
+ "description": {
322
+ "show": true,
323
+ "text": "description",
324
+ "location": 0
325
+ },
326
+ "result": {
327
+ "show": true,
328
+ "text": "result",
329
+ "location": 100
330
+ },
331
+ "radius": {
332
+ "min": 1,
333
+ "max": 8,
334
+ "scalingColumn": ""
335
+ },
336
+ "regression": {
337
+ "lower": 0,
338
+ "upper": 0,
339
+ "estimateField": 0
340
+ },
341
+ "leftWidthOffset": 0,
342
+ "rightWidthOffset": 0,
343
+ "showZeroLine": false,
344
+ "leftLabel": "",
345
+ "rightLabel": "",
346
+ "hideDateCategoryCol": false
347
+ },
348
+ "area": {
349
+ "isStacked": false
350
+ },
351
+ "sankey": {
352
+ "title": {
353
+ "defaultColor": "black"
354
+ },
355
+ "iterations": 1,
356
+ "rxValue": 0.9,
357
+ "overallSize": {
358
+ "width": 900,
359
+ "height": 700
360
+ },
361
+ "margin": {
362
+ "margin_y": 25,
363
+ "margin_x": 0
364
+ },
365
+ "nodeSize": {
366
+ "nodeWidth": 26,
367
+ "nodeHeight": 40
368
+ },
369
+ "nodePadding": 55,
370
+ "nodeFontColor": "black",
371
+ "nodeColor": {
372
+ "default": "#ff8500",
373
+ "inactive": "#808080"
374
+ },
375
+ "linkColor": {
376
+ "default": "#ffc900",
377
+ "inactive": "#D3D3D3"
378
+ },
379
+ "opacity": {
380
+ "nodeOpacityDefault": 1,
381
+ "nodeOpacityInactive": 0.1,
382
+ "LinkOpacityDefault": 1,
383
+ "LinkOpacityInactive": 0.1
384
+ },
385
+ "storyNodeFontColor": "#006778",
386
+ "storyNodeText": [],
387
+ "nodeValueStyle": {
388
+ "textBefore": "(",
389
+ "textAfter": ")"
390
+ },
391
+ "data": []
392
+ },
393
+ "suppressedData": [],
394
+ "height": "332",
395
+ "data": [
396
+ {
397
+ "Date": "1/15/2016",
398
+ "Data 1": "$1,000",
399
+ "Data 2": "ABC",
400
+ "Data 3": "100",
401
+ "Data 4": "90",
402
+ "Monthly-Goal": "100"
403
+ },
404
+ {
405
+ "Date": "2/15/2016",
406
+ "Data 1": "100",
407
+ "Data 2": "110",
408
+ "Data 3": "100",
409
+ "Data 4": "100",
410
+ "Monthly-Goal": "100"
411
+ },
412
+ {
413
+ "Date": "3/15/2016",
414
+ "Data 1": "80",
415
+ "Data 2": "90",
416
+ "Data 3": "100",
417
+ "Data 4": "120",
418
+ "Monthly-Goal": "110"
419
+ },
420
+ {
421
+ "Date": "4/15/2016",
422
+ "Data 1": "80",
423
+ "Data 2": "90",
424
+ "Data 3": "110",
425
+ "Data 4": "120",
426
+ "Monthly-Goal": "110"
427
+ },
428
+ {
429
+ "Date": "5/15/2016",
430
+ "Data 1": "70",
431
+ "Data 2": "90",
432
+ "Data 3": "110",
433
+ "Data 4": "130",
434
+ "Monthly-Goal": "120"
435
+ },
436
+ {
437
+ "Date": "6/15/2016",
438
+ "Data 1": "100",
439
+ "Data 2": "120",
440
+ "Data 3": "120",
441
+ "Data 4": "130",
442
+ "Monthly-Goal": "120"
443
+ },
444
+ {
445
+ "Date": "7/15/2016",
446
+ "Data 1": "110",
447
+ "Data 2": "140",
448
+ "Data 3": "120",
449
+ "Data 4": "130",
450
+ "Monthly-Goal": "130"
451
+ },
452
+ {
453
+ "Date": "8/15/2016",
454
+ "Data 1": "110",
455
+ "Data 2": "130",
456
+ "Data 3": "120",
457
+ "Data 4": "140",
458
+ "Monthly-Goal": "130"
459
+ },
460
+ {
461
+ "Date": "9/15/2016",
462
+ "Data 1": "120",
463
+ "Data 2": "",
464
+ "Data 3": "120",
465
+ "Data 4": "150",
466
+ "Monthly-Goal": "140"
467
+ }
468
+ ],
469
+ "visualizationType": "Bar",
470
+ "filters": [],
471
+ "validated": 4.23,
472
+ "dynamicMarginTop": 0,
473
+ "version": "4.24.4"
474
+ }
@@ -1,3 +1,4 @@
1
+ @import '../../styles/base.scss';
1
2
  @import '../../styles/_variables';
2
3
  @import '../../styles/_mixins';
3
4
  @import '../../styles/_data-table';
@@ -6,4 +7,16 @@
6
7
  .visually-hidden {
7
8
  position: fixed;
8
9
  left: -10000px;
9
- }
10
+ }
11
+
12
+ .debug .editor-panel {
13
+ border: 2px dashed red !important;
14
+ background-color: rgba(255, 0, 0, 0.1);
15
+ padding: 5px;
16
+ }
17
+
18
+ .debug div[class*='type-'] {
19
+ border: 2px dashed green !important;
20
+ background-color: rgba(55, 255, 0, 0.1);
21
+ padding: 5px;
22
+ }
@@ -1,8 +1,8 @@
1
1
  export default function createBarElement(props) {
2
- const { config, index, id, className, background, borderColor, borderWidth, width, height, x, y, onMouseOver, onMouseLeave, onClick, tooltipHtml, tooltipId, styleOverrides, seriesHighlight } = props
2
+ const { config, index, id, className, background, borderColor, borderWidth, width, height, x, y, onMouseOver, onMouseLeave, onClick, tooltipHtml, tooltipId, styleOverrides, seriesHighlight, type } = props
3
3
 
4
- const adjustedWidth = Math.max(0, width);
5
- const adjustedHeight = Math.max(0, height);
4
+ const adjustedWidth = Math.max(0, width)
5
+ const adjustedHeight = Math.max(0, height)
6
6
 
7
7
  const isHorizontal = config.orientation === 'horizontal'
8
8
  const isRounded = config.barStyle === 'rounded'
@@ -79,7 +79,7 @@ export default function createBarElement(props) {
79
79
  }
80
80
 
81
81
  let path
82
- if (index === undefined || index === null || !isRounded) {
82
+ if (index === undefined || index === null || !isRounded || type == 'axisBar') {
83
83
  path = nonRounded()
84
84
  } else {
85
85
  path = nonRounded()
@@ -3,7 +3,7 @@ import '../../styles/v2/components/input/index.scss'
3
3
  interface InputProps {
4
4
  label?
5
5
  value?
6
- options: string[] | { [key: string]: string }
6
+ options: string[] | Record<string, any> | [any, string][]
7
7
  fieldName
8
8
  section?
9
9
  subsection?
@@ -17,11 +17,22 @@ const InputSelect = ({ label, value, options, fieldName, section = null, subsect
17
17
 
18
18
  if (Array.isArray(options)) {
19
19
  //Handle basic array
20
- optionsJsx = options.map(optionName => (
21
- <option value={optionName} key={optionName}>
22
- {optionName}
23
- </option>
24
- ))
20
+ optionsJsx = options.map(option => {
21
+ if (typeof option === 'string') {
22
+ return (
23
+ <option value={option} key={option}>
24
+ {option}
25
+ </option>
26
+ )
27
+ } else {
28
+ const [value, name] = option
29
+ return (
30
+ <option value={value} key={name}>
31
+ {name}
32
+ </option>
33
+ )
34
+ }
35
+ })
25
36
  } else {
26
37
  //Handle object with value/name pairs
27
38
  optionsJsx = []
@@ -1,4 +1,3 @@
1
- import React from 'react'
2
1
  import PropTypes from 'prop-types'
3
2
 
4
3
  import iconCaretUp from '../../assets/icon-caret-up.svg'
@@ -8,6 +7,7 @@ import iconCaretFilledDown from '../../assets/icon-caret-filled-down.svg'
8
7
  import iconChartBar from '../../assets/icon-chart-bar.svg'
9
8
  import iconChartLine from '../../assets/icon-chart-line.svg'
10
9
  import iconChartPie from '../../assets/icon-chart-pie.svg'
10
+ import iconCheck from '../../assets/icon-check.svg'
11
11
  import iconClose from '../../assets/icon-close.svg'
12
12
  import iconCode from '../../assets/icon-code.svg'
13
13
  import iconDataBite from '../../assets/icon-databite.svg'
@@ -26,6 +26,7 @@ import iconUpload from '../../assets/icon-upload.svg'
26
26
  import iconWarningCircle from '../../assets/icon-warning-circle.svg'
27
27
  import iconWarningTriangle from '../../assets/icon-warning-triangle.svg'
28
28
  import iconGear from '../../assets/icon-gear.svg'
29
+ import iconGearMulti from '../../assets/icon-gear-multi.svg'
29
30
  import iconTools from '../../assets/icon-tools.svg'
30
31
  import iconText from '../../assets/icon-filtered-text.svg'
31
32
  import iconDropdowns from '../../assets/icon-filter-dropdowns.svg'
@@ -45,6 +46,7 @@ const iconHash = {
45
46
  caretFilledDown: iconCaretFilledDown,
46
47
  chartBar: iconChartBar,
47
48
  chartLine: iconChartLine,
49
+ check: iconCheck,
48
50
  chartPie: iconChartPie,
49
51
  close: iconClose,
50
52
  code: iconCode,
@@ -64,20 +66,37 @@ const iconHash = {
64
66
  warningCircle: iconWarningCircle,
65
67
  warningTriangle: iconWarningTriangle,
66
68
  gear: iconGear,
69
+ gearMulti: iconGearMulti,
67
70
  tools: iconTools,
68
71
  plus: iconPlus,
69
72
  minus: iconMinus,
70
73
  'filtered-text': iconText,
71
- 'filter-dropdowns': iconDropdowns,
74
+ dashboardFilters: iconDropdowns,
72
75
  table: iconTable,
73
76
  sankey: iconSankey,
74
77
  rotateLeft: iconRotateLeft,
75
78
  command: iconCommand
76
79
  }
77
80
 
81
+ export type IconType = keyof typeof iconHash
82
+
78
83
  export const ICON_TYPES = Object.keys(iconHash)
79
84
 
80
- const Icon = ({ display = '', base = undefined, alt = '', size = undefined, color = undefined, style = undefined, ...attributes }) => {
85
+ type IconProps = {
86
+ /* Define the icon to display */
87
+ display: keyof typeof iconHash
88
+ /* Returns icon data as plain svg */
89
+ base?: boolean
90
+ /* Sets alt text for the icon */
91
+ alt: string
92
+ /* Override the width of the icon (scales height proportionally)*/
93
+ size?: number
94
+ /* Override the color of the icon */
95
+ color?: string
96
+ style?: string
97
+ }
98
+
99
+ const Icon: React.FC<IconProps> = ({ display = '', base = undefined, alt = '', size = undefined, color = undefined, style = undefined, ...attributes }) => {
81
100
  const IconObj = iconHash[display] || null
82
101
 
83
102
  const filteredAttrs = { ...attributes }
@@ -103,17 +122,4 @@ const Icon = ({ display = '', base = undefined, alt = '', size = undefined, colo
103
122
  )
104
123
  }
105
124
 
106
- Icon.propTypes = {
107
- /* Define the icon to display */
108
- display: PropTypes.oneOf(Object.keys(iconHash)),
109
- /* Returns icon data as plain svg */
110
- base: PropTypes.bool,
111
- /* Sets alt text for the icon */
112
- alt: PropTypes.string,
113
- /* Override the width of the icon (scales height proportionally)*/
114
- size: PropTypes.number,
115
- /* Override the color of the icon */
116
- color: PropTypes.string
117
- }
118
-
119
125
  export default Icon
@@ -87,14 +87,6 @@
87
87
  }
88
88
  }
89
89
 
90
- // add additional space below title if needed
91
- .map-title.cove-component__header,
92
- .type-chart .cove-component__header {
93
- &:not(:empty) {
94
- margin: 0 0 1rem 0 !important;
95
- }
96
- }
97
-
98
90
  // fix sparkline bottom margin gap
99
91
  .type-sparkline.type-chart .cove-component__header {
100
92
  margin: 0px !important;
@@ -149,8 +149,8 @@ export class DataTransform {
149
149
  standardizedMapped[uniqueKey][key] = row[key]
150
150
  }
151
151
  })
152
- description.valueKeysTallSupport.forEach(valueKey => {
153
- standardizedMapped[uniqueKey][row[description.seriesKey] + '-' + valueKey] = row[valueKey]
152
+ description.valueKeysTallSupport.forEach((valueKey, i) => {
153
+ standardizedMapped[uniqueKey][i === 0 ? row[description.seriesKey] : (row[description.seriesKey] + '-' + valueKey)] = row[valueKey]
154
154
  })
155
155
  })
156
156