@cdc/waffle-chart 4.25.7 → 4.25.10
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/dist/cdcwafflechart.js +4449 -4173
- package/package.json +13 -4
- package/src/CdcWaffleChart.tsx +3 -1
- package/src/_stories/WaffleChart.Editor.stories.tsx +740 -0
- package/src/_stories/WaffleChart.stories.tsx +1 -1
- package/src/components/EditorPanel.jsx +2 -2
- package/src/index.jsx +5 -2
- package/src/test/CdcWaffleChart.test.jsx +8 -3
- package/tests/fixtures/example-data.json +50 -0
- package/tests/fixtures/test-config.json +41 -0
- package/vite.config.js +1 -1
- package/src/coreStyles_wafflechart.scss +0 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cdc/waffle-chart",
|
|
3
|
-
"version": "4.25.
|
|
3
|
+
"version": "4.25.10",
|
|
4
4
|
"description": "React component for displaying a single piece of data in a card module",
|
|
5
5
|
"moduleName": "CdcWaffleChart",
|
|
6
6
|
"main": "dist/cdcwafflechart",
|
|
@@ -27,15 +27,24 @@
|
|
|
27
27
|
"license": "Apache-2.0",
|
|
28
28
|
"homepage": "https://github.com/CDCgov/cdc-open-viz#readme",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@cdc/core": "^4.25.
|
|
30
|
+
"@cdc/core": "^4.25.10",
|
|
31
31
|
"@visx/shape": "^3.12.0",
|
|
32
32
|
"@visx/text": "^3.12.0",
|
|
33
33
|
"chroma": "0.0.1",
|
|
34
|
-
"react-
|
|
34
|
+
"html-react-parser": "5.2.3",
|
|
35
|
+
"react-accessible-accordion": "^5.0.1",
|
|
36
|
+
"resize-observer-polyfill": "^1.5.1"
|
|
35
37
|
},
|
|
36
38
|
"peerDependencies": {
|
|
37
39
|
"react": "^18.2.0",
|
|
38
40
|
"react-dom": "^18.2.0"
|
|
39
41
|
},
|
|
40
|
-
"
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@rollup/plugin-dsv": "^3.0.2",
|
|
44
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
45
|
+
"vite": "^4.4.11",
|
|
46
|
+
"vite-plugin-css-injected-by-js": "^2.4.0",
|
|
47
|
+
"vite-plugin-svgr": "^2.4.0"
|
|
48
|
+
},
|
|
49
|
+
"gitHead": "c2db758e74ab9b9ca1667a6f9cb41dd0dccf985d"
|
|
41
50
|
}
|
package/src/CdcWaffleChart.tsx
CHANGED
|
@@ -36,6 +36,7 @@ type CdcWaffleChartProps = {
|
|
|
36
36
|
isEditor?: boolean
|
|
37
37
|
link?: string
|
|
38
38
|
setConfig?: () => void
|
|
39
|
+
interactionLabel?: string
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
const WaffleChart = ({ config, isEditor, link = '', showConfigConfirm, updateConfig }) => {
|
|
@@ -438,7 +439,8 @@ const CdcWaffleChart = ({
|
|
|
438
439
|
config: configObj,
|
|
439
440
|
isDashboard = false,
|
|
440
441
|
isEditor = false,
|
|
441
|
-
setConfig: setParentConfig
|
|
442
|
+
setConfig: setParentConfig,
|
|
443
|
+
interactionLabel = ''
|
|
442
444
|
}: CdcWaffleChartProps) => {
|
|
443
445
|
// Default States
|
|
444
446
|
const [state, dispatch] = useReducer(chartReducer, {
|