@cdc/editor 4.22.10 → 4.22.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 (38) hide show
  1. package/README.md +8 -7
  2. package/dist/cdceditor.js +42 -42
  3. package/example/data-horizontal-filters.json +5 -6
  4. package/example/data-horizontal-multiseries-filters.json +13 -15
  5. package/example/data-horizontal-multiseries.json +4 -5
  6. package/example/data-horizontal.json +2 -3
  7. package/example/data-vertical-filters.json +7 -8
  8. package/example/data-vertical-multiseries-filters.json +13 -15
  9. package/example/data-vertical-multiseries-multirow-filters.json +49 -52
  10. package/example/data-vertical-multiseries-multirow.json +11 -11
  11. package/example/data-vertical-multiseries.json +4 -5
  12. package/example/data-vertical.json +4 -5
  13. package/example/private/city-state.json +434 -0
  14. package/example/private/example-city-state.json +86 -0
  15. package/example/private/map-issue.csv +11 -0
  16. package/example/private/test.html +26 -1
  17. package/example/region-map.json +32 -32
  18. package/example/valid-county-data.json +3047 -3047
  19. package/package.json +8 -8
  20. package/src/CdcEditor.js +72 -72
  21. package/src/components/ChooseTab.js +67 -88
  22. package/src/components/ConfigureTab.js +51 -51
  23. package/src/components/DataImport.js +248 -246
  24. package/src/components/PreviewDataTable.js +130 -149
  25. package/src/components/TabPane.js +3 -3
  26. package/src/components/Tabs.js +20 -27
  27. package/src/components/modal/Confirmation.js +16 -13
  28. package/src/components/modal/Modal.js +23 -35
  29. package/src/components/modal/UseModal.js +8 -8
  30. package/src/context.js +4 -4
  31. package/src/index.html +1 -4
  32. package/src/index.js +6 -7
  33. package/src/scss/_data-table.scss +1 -1
  34. package/src/scss/_variables.scss +1 -1
  35. package/src/scss/choose-vis-tab.scss +63 -63
  36. package/src/scss/configure-tab.scss +17 -17
  37. package/src/scss/data-import.scss +177 -177
  38. package/src/scss/main.scss +31 -32
@@ -1,60 +1,60 @@
1
- import React, { useContext } from 'react';
1
+ import React, { useContext } from 'react'
2
2
 
3
- import CdcDashboard from '@cdc/dashboard'; // TODO: Lazy load this
4
- import CdcMap from '@cdc/map'; // TODO: Lazy load this
5
- import CdcChart from '@cdc/chart'; // TODO: Lazy load this
6
- import CdcDataBite from '@cdc/data-bite';
3
+ import CdcDashboard from '@cdc/dashboard' // TODO: Lazy load this
4
+ import CdcMap from '@cdc/map' // TODO: Lazy load this
5
+ import CdcChart from '@cdc/chart' // TODO: Lazy load this
6
+ import CdcDataBite from '@cdc/data-bite'
7
7
  import CdcWaffleChart from '@cdc/waffle-chart'
8
8
  import CdcMarkupInclude from '@cdc/markup-include'
9
9
 
10
- import '../scss/configure-tab.scss';
10
+ import '../scss/configure-tab.scss'
11
11
 
12
- import ErrorBoundary from '@cdc/core/components/ErrorBoundary';
13
- import GlobalState from '../context';
12
+ import ErrorBoundary from '@cdc/core/components/ErrorBoundary'
13
+ import GlobalState from '../context'
14
14
 
15
- export default function ConfigureTab({containerEl}) {
16
- const { config, setTempConfig, hostname } = useContext(GlobalState);
15
+ export default function ConfigureTab({ containerEl }) {
16
+ const { config, setTempConfig, hostname } = useContext(GlobalState)
17
17
 
18
- let { type } = config
18
+ let { type } = config
19
19
 
20
- switch (type) {
21
- case 'map':
22
- return (
23
- <ErrorBoundary component="CdcMap">
24
- <CdcMap isEditor={true} config={config} hostname={hostname} setConfig={setTempConfig} containerEl={containerEl} />
25
- </ErrorBoundary>
26
- )
27
- case 'chart':
28
- return (
29
- <ErrorBoundary component="CdcChart">
30
- <CdcChart isEditor={true} config={config} setConfig={setTempConfig} />
31
- </ErrorBoundary>
32
- )
33
- case 'dashboard':
34
- return (
35
- <ErrorBoundary component="CdcDashboard">
36
- <CdcDashboard isEditor={true} config={config} setConfig={setTempConfig} />
37
- </ErrorBoundary>
38
- )
39
- case 'data-bite':
40
- return (
41
- <ErrorBoundary component="CdcDashboard">
42
- <CdcDataBite isEditor={true} config={config} setConfig={setTempConfig} />
43
- </ErrorBoundary>
44
- )
45
- case 'waffle-chart':
46
- return (
47
- <ErrorBoundary component="CdcDashboard">
48
- <CdcWaffleChart isEditor={true} config={config} setConfig={setTempConfig} />
49
- </ErrorBoundary>
50
- )
51
- case 'markup-include':
52
- return (
53
- <ErrorBoundary component="CdcDashboard">
54
- <CdcMarkupInclude isEditor={true} config={config} setConfig={setTempConfig} />
55
- </ErrorBoundary>
56
- )
57
- default:
58
- return <p>No visualization type selected.</p>
59
- }
20
+ switch (type) {
21
+ case 'map':
22
+ return (
23
+ <ErrorBoundary component='CdcMap'>
24
+ <CdcMap isEditor={true} config={config} hostname={hostname} setConfig={setTempConfig} containerEl={containerEl} />
25
+ </ErrorBoundary>
26
+ )
27
+ case 'chart':
28
+ return (
29
+ <ErrorBoundary component='CdcChart'>
30
+ <CdcChart isEditor={true} config={config} setConfig={setTempConfig} />
31
+ </ErrorBoundary>
32
+ )
33
+ case 'dashboard':
34
+ return (
35
+ <ErrorBoundary component='CdcDashboard'>
36
+ <CdcDashboard isEditor={true} config={config} setConfig={setTempConfig} />
37
+ </ErrorBoundary>
38
+ )
39
+ case 'data-bite':
40
+ return (
41
+ <ErrorBoundary component='CdcDashboard'>
42
+ <CdcDataBite isEditor={true} config={config} setConfig={setTempConfig} />
43
+ </ErrorBoundary>
44
+ )
45
+ case 'waffle-chart':
46
+ return (
47
+ <ErrorBoundary component='CdcDashboard'>
48
+ <CdcWaffleChart isEditor={true} config={config} setConfig={setTempConfig} />
49
+ </ErrorBoundary>
50
+ )
51
+ case 'markup-include':
52
+ return (
53
+ <ErrorBoundary component='CdcDashboard'>
54
+ <CdcMarkupInclude isEditor={true} config={config} setConfig={setTempConfig} />
55
+ </ErrorBoundary>
56
+ )
57
+ default:
58
+ return <p>No visualization type selected.</p>
59
+ }
60
60
  }