@cdc/editor 4.25.5-1 → 4.25.6-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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdc/editor",
3
- "version": "4.25.5-1",
3
+ "version": "4.25.6-1",
4
4
  "description": "React component for generating a new component entry",
5
5
  "moduleName": "CdcEditor",
6
6
  "main": "dist/cdceditor",
@@ -25,21 +25,21 @@
25
25
  },
26
26
  "license": "Apache-2.0",
27
27
  "dependencies": {
28
- "@cdc/chart": "^4.25.5-1",
29
- "@cdc/core": "^4.25.5-1",
30
- "@cdc/dashboard": "^4.25.5-1",
31
- "@cdc/data-bite": "^4.25.5-1",
32
- "@cdc/map": "^4.25.5-1",
33
- "@cdc/markup-include": "^4.25.5-1",
34
- "@cdc/waffle-chart": "^4.25.5-1",
35
- "axios": "^1.6.0",
36
- "d3": "^7.0.0",
37
- "react-dropzone": "^11.2.4",
38
- "use-debounce": "^5.2.0"
28
+ "@cdc/chart": "^4.25.6-1",
29
+ "@cdc/core": "^4.25.6-1",
30
+ "@cdc/dashboard": "^4.25.6-1",
31
+ "@cdc/data-bite": "^4.25.6-1",
32
+ "@cdc/map": "^4.25.6-1",
33
+ "@cdc/markup-include": "^4.25.6-1",
34
+ "@cdc/waffle-chart": "^4.25.6-1",
35
+ "axios": "^1.9.0",
36
+ "d3": "^7.9.0",
37
+ "react-dropzone": "^14.3.8",
38
+ "use-debounce": "^10.0.5"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "react": "^18.2.0",
42
42
  "react-dom": "^18.2.0"
43
43
  },
44
- "gitHead": "1d0a6e716bc113e6bea3636fcae90ebf2d19bb5c"
44
+ "gitHead": "ac45ee0f1d6a4045648c4e083992fc091795e084"
45
45
  }
@@ -25,6 +25,7 @@ import DeviationIcon from '@cdc/core/assets/icon-deviation-bar.svg'
25
25
  import SankeyIcon from '@cdc/core/assets/icon-sankey.svg'
26
26
  import ComboChartIcon from '@cdc/core/assets/icon-combo-chart.svg'
27
27
  import EpiChartIcon from '@cdc/core/assets/icon-epi-chart.svg'
28
+ import TableIcon from '@cdc/core/assets/icon-table.svg'
28
29
  import Icon from '@cdc/core/components/ui/Icon'
29
30
 
30
31
  interface ButtonProps {
@@ -95,6 +96,18 @@ const ChooseTab: React.FC = (): JSX.Element => {
95
96
  }
96
97
  break
97
98
  }
99
+
100
+ case 'Table': {
101
+ const visualizationType = props.subType
102
+ newConfig = {
103
+ ...props,
104
+ visualizationType,
105
+ newViz: true,
106
+ datasets: {},
107
+ type: 'table'
108
+ }
109
+ break
110
+ }
98
111
  }
99
112
 
100
113
  return newConfig
@@ -437,5 +450,13 @@ const buttons = [
437
450
  generalType: 'us-geocode',
438
451
  icon: <UsaIcon />,
439
452
  content: 'United States GeoCode'
453
+ },
454
+ {
455
+ id: 24,
456
+ category: 'General',
457
+ label: 'Data Table',
458
+ type: 'table',
459
+ subType: null,
460
+ icon: <TableIcon />
440
461
  }
441
462
  ]
@@ -9,6 +9,7 @@ import CdcMarkupInclude from '@cdc/markup-include/src/CdcMarkupInclude'
9
9
  import ErrorBoundary from '@cdc/core/components/ErrorBoundary'
10
10
  import ConfigContext from '../ConfigContext'
11
11
  import MultiDashboardWrapper from '@cdc/dashboard/src/CdcDashboard'
12
+ import CdcDataTable from '../../../data-table/src/CdcDataTable'
12
13
 
13
14
  export default function ConfigureTab({ containerEl }) {
14
15
  const { config, setTempConfig, isDebug } = useContext(ConfigContext)
@@ -55,6 +56,12 @@ export default function ConfigureTab({ containerEl }) {
55
56
  <CdcMarkupInclude isEditor={true} isDebug={isDebug} config={config} setConfig={setTempConfig} />
56
57
  </ErrorBoundary>
57
58
  )
59
+ case 'table':
60
+ return (
61
+ <ErrorBoundary component='CdcDataTable'>
62
+ <CdcDataTable isEditor={true} isDebug={isDebug} config={config} />
63
+ </ErrorBoundary>
64
+ )
58
65
  default:
59
66
  return <p>No visualization type selected.</p>
60
67
  }
@@ -13,7 +13,7 @@
13
13
  list-style: none;
14
14
  display: grid;
15
15
  &.category_general {
16
- grid-template-columns: repeat(4, 180px);
16
+ grid-template-columns: repeat(5, 180px);
17
17
  }
18
18
  &.category_charts {
19
19
  grid-template-columns: repeat(7, 180px);