@cdc/core 4.23.11 → 4.24.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.
- package/components/DataTable/DataTable.tsx +27 -9
- package/components/DataTable/components/ChartHeader.tsx +17 -5
- package/components/DataTable/components/ExpandCollapse.tsx +1 -1
- package/components/DataTable/helpers/chartCellMatrix.tsx +16 -2
- package/components/DataTable/helpers/customColumns.ts +25 -0
- package/components/DataTable/helpers/getChartCellValue.ts +1 -0
- package/components/DataTable/helpers/getDataSeriesColumns.ts +1 -0
- package/components/DataTable/types/TableConfig.ts +5 -10
- package/components/EditorPanel/DataTableEditor.tsx +133 -0
- package/components/EditorPanel/Inputs.tsx +150 -0
- package/components/Filters.jsx +3 -3
- package/components/MediaControls.jsx +1 -1
- package/components/MultiSelect/MultiSelect.tsx +95 -0
- package/components/MultiSelect/index.ts +1 -0
- package/components/MultiSelect/multiselect.styles.css +50 -0
- package/components/Table/Table.tsx +23 -3
- package/components/Table/components/Cell.tsx +3 -3
- package/components/Table/components/GroupRow.tsx +6 -2
- package/components/Table/components/Row.tsx +9 -2
- package/components/Table/types/RowType.ts +5 -0
- package/components/_stories/DataTable.stories.tsx +41 -0
- package/components/_stories/EditorPanel.stories.tsx +53 -0
- package/components/_stories/Inputs.stories.tsx +37 -0
- package/components/_stories/MultiSelect.stories.tsx +24 -0
- package/components/_stories/_mocks/row_type.json +42 -0
- package/components/inputs/{InputSelect.jsx → InputSelect.tsx} +15 -5
- package/components/managers/DataDesigner.tsx +8 -8
- package/components/ui/{Icon.jsx → Icon.tsx} +3 -3
- package/helpers/DataTransform.ts +30 -2
- package/helpers/getFileExtension.ts +28 -5
- package/package.json +2 -2
- package/styles/_data-table.scss +2 -0
- package/types/Axis.ts +37 -2
- package/types/Column.ts +15 -0
- package/types/FilterBehavior.ts +1 -0
- package/types/Runtime.ts +21 -1
- package/types/Series.ts +1 -1
- package/types/Table.ts +18 -0
- package/types/UpdateFieldFunc.ts +1 -0
- package/types/Visualization.ts +9 -9
package/styles/_data-table.scss
CHANGED
|
@@ -51,6 +51,7 @@ table.data-table {
|
|
|
51
51
|
overflow: auto;
|
|
52
52
|
appearance: none;
|
|
53
53
|
table-layout: fixed;
|
|
54
|
+
display: grid;
|
|
54
55
|
* {
|
|
55
56
|
box-sizing: border-box;
|
|
56
57
|
}
|
|
@@ -137,6 +138,7 @@ table.data-table {
|
|
|
137
138
|
}
|
|
138
139
|
|
|
139
140
|
tbody {
|
|
141
|
+
display: table-cell;
|
|
140
142
|
tr {
|
|
141
143
|
width: 100%;
|
|
142
144
|
&:hover {
|
package/types/Axis.ts
CHANGED
|
@@ -1,6 +1,41 @@
|
|
|
1
|
+
export type Anchor = {
|
|
2
|
+
value: string
|
|
3
|
+
color: string
|
|
4
|
+
lineStyle: string
|
|
5
|
+
}
|
|
6
|
+
|
|
1
7
|
export type Axis = {
|
|
8
|
+
anchors?: Anchor[]
|
|
2
9
|
dataKey: string
|
|
3
|
-
type: string
|
|
4
|
-
dateParseFormat: string
|
|
5
10
|
dateDisplayFormat: string
|
|
11
|
+
dateParseFormat: string
|
|
12
|
+
displayNumbersOnBar?: boolean
|
|
13
|
+
enablePadding?: boolean
|
|
14
|
+
gridLines?: boolean
|
|
15
|
+
hideAxis?: boolean
|
|
16
|
+
hideLabel?: boolean
|
|
17
|
+
hideTicks?: boolean
|
|
18
|
+
label?: string
|
|
19
|
+
labelOffset?: number
|
|
20
|
+
labelPlacement?: string
|
|
21
|
+
max?: string
|
|
22
|
+
maxTickRotation?: number
|
|
23
|
+
min?: string
|
|
24
|
+
numTicks?: number
|
|
25
|
+
rightAxisSize?: number
|
|
26
|
+
rightHideAxis?: boolean
|
|
27
|
+
rightHideLabel?: boolean
|
|
28
|
+
rightHideTicks?: boolean
|
|
29
|
+
rightLabel?: string
|
|
30
|
+
rightLabelOffsetSize?: number
|
|
31
|
+
rightMax?: string
|
|
32
|
+
rightNumTicks?: number
|
|
33
|
+
sortDates?: boolean
|
|
34
|
+
showTargetLabel?: boolean
|
|
35
|
+
size?: number
|
|
36
|
+
target?: number
|
|
37
|
+
targetLabel?: string
|
|
38
|
+
tickRotation?: number
|
|
39
|
+
tickWidthMax?: number
|
|
40
|
+
type: string
|
|
6
41
|
}
|
package/types/Column.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type Column = {
|
|
2
|
+
name?: string
|
|
3
|
+
label: string
|
|
4
|
+
prefix: string
|
|
5
|
+
suffix: string
|
|
6
|
+
roundToPlace: number
|
|
7
|
+
commas: boolean
|
|
8
|
+
dataTable: boolean
|
|
9
|
+
startingPoint: string
|
|
10
|
+
series?: string
|
|
11
|
+
tooltips: boolean
|
|
12
|
+
forestPlot: boolean
|
|
13
|
+
forestPlotAlignRight: boolean
|
|
14
|
+
forestPlotStartingPoint: number
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type FilterBehavior = 'Apply Button' | 'Filter Change'
|
package/types/Runtime.ts
CHANGED
|
@@ -1,9 +1,29 @@
|
|
|
1
|
+
import { Axis } from './Axis'
|
|
2
|
+
|
|
3
|
+
export type ForecastingSeriesKey = {
|
|
4
|
+
stages: {
|
|
5
|
+
key: string
|
|
6
|
+
color: string
|
|
7
|
+
}[]
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export type BarSeriesKey = {
|
|
11
|
+
key: string
|
|
12
|
+
color: string
|
|
13
|
+
}
|
|
14
|
+
|
|
1
15
|
export type Runtime = {
|
|
16
|
+
barSeriesKeys?: BarSeriesKey[]
|
|
17
|
+
forecastingSeriesKeys?: ForecastingSeriesKey[]
|
|
2
18
|
originalXAxis: {
|
|
3
19
|
dataKey: string
|
|
4
20
|
name: string
|
|
5
21
|
axis: string
|
|
6
22
|
}
|
|
7
|
-
|
|
23
|
+
xAxis: Axis
|
|
24
|
+
yAxis: Axis
|
|
25
|
+
seriesKeys: any[]
|
|
26
|
+
seriesLabels: string[]
|
|
27
|
+
seriesLabelsAll: string[]
|
|
8
28
|
editorErrorMessage: string
|
|
9
29
|
}
|
package/types/Series.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export type Series = { dataKey: string; name: string; axis: string }[]
|
|
1
|
+
export type Series = { dataKey: string; name: string; axis: string; type: string }[]
|
package/types/Table.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type Table = {
|
|
2
|
+
cellMinWidth?: number
|
|
3
|
+
label?: string
|
|
4
|
+
show?: boolean
|
|
5
|
+
showVertical?: boolean
|
|
6
|
+
indexLabel?: string
|
|
7
|
+
caption?: string
|
|
8
|
+
limitHeight?: boolean
|
|
9
|
+
height?: number
|
|
10
|
+
expanded?: boolean
|
|
11
|
+
showDataTableLink?: boolean
|
|
12
|
+
showDownloadUrl?: boolean
|
|
13
|
+
download?: boolean
|
|
14
|
+
showDownloadImgButton?: boolean
|
|
15
|
+
showDownloadPdfButton?: boolean
|
|
16
|
+
customTableConfig?: boolean
|
|
17
|
+
excludeColumns?: string[]
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type UpdateFieldFunc<T> = (section: string | null, subsection: string | null, fieldName: string, value: T) => void
|
package/types/Visualization.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
export type Visualization = {
|
|
2
|
-
|
|
3
|
-
dataKey: string
|
|
4
|
-
formattedData: any
|
|
5
|
-
dataDescription: Object
|
|
2
|
+
autoLoad: boolean
|
|
6
3
|
data: any
|
|
7
|
-
|
|
4
|
+
dataDescription: Object
|
|
5
|
+
dataKey: string
|
|
8
6
|
editing: boolean
|
|
9
|
-
|
|
7
|
+
formattedData: any
|
|
8
|
+
general: any
|
|
9
|
+
hide: any[]
|
|
10
10
|
newViz: boolean
|
|
11
11
|
openModal: boolean
|
|
12
|
-
|
|
13
|
-
autoLoad: boolean
|
|
12
|
+
originalFormattedData: any
|
|
14
13
|
table: {
|
|
15
14
|
showDataTableLink: boolean
|
|
16
15
|
}
|
|
17
|
-
general: any
|
|
18
16
|
title: string
|
|
17
|
+
type: 'chart' | 'map' | 'data-bite' | 'waffle-chart' | 'markup-include' | 'filtered-text' | 'filter-dropdowns'
|
|
19
18
|
uid: string
|
|
20
19
|
usesSharedFilter: any
|
|
20
|
+
visualizationType: string
|
|
21
21
|
}
|