@cdc/waffle-chart 4.25.3 → 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/waffle-chart",
3
- "version": "4.25.3",
3
+ "version": "4.25.6-1",
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,20 +27,15 @@
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.3",
31
- "@visx/group": "^3.0.0",
32
- "@visx/scale": "^3.0.0",
33
- "@visx/shape": "^3.0.0",
34
- "@visx/text": "^3.0.0",
30
+ "@cdc/core": "^4.25.6-1",
31
+ "@visx/shape": "^3.12.0",
32
+ "@visx/text": "^3.12.0",
35
33
  "chroma": "0.0.1",
36
- "chroma-js": "^2.1.0",
37
- "html-react-parser": "^3.0.8",
38
- "react-accessible-accordion": "^3.3.4",
39
- "whatwg-fetch": "^3.6.2"
34
+ "react-accessible-accordion": "^5.0.1"
40
35
  },
41
36
  "peerDependencies": {
42
37
  "react": "^18.2.0",
43
38
  "react-dom": "^18.2.0"
44
39
  },
45
- "gitHead": "b09566f5a7d57c8d0109e5f407257729d6b36846"
40
+ "gitHead": "ac45ee0f1d6a4045648c4e083992fc091795e084"
46
41
  }
@@ -360,7 +360,12 @@ const WaffleChart = ({ config, isEditor, link = '', showConfigConfirm, updateCon
360
360
 
361
361
  return (
362
362
  <div className='cove-component__content'>
363
- <Title title={title} config={config} classes={['chart-title', `${config.theme}`, 'mb-0']} />
363
+ <Title
364
+ showTitle={config.showTitle}
365
+ title={title}
366
+ config={config}
367
+ classes={['chart-title', `${config.theme}`, 'mb-0']}
368
+ />
364
369
  <div className={contentClasses.join(' ')}>
365
370
  {!config.newViz && config.runtime && config.runtime.editorErrorMessage && (
366
371
  <Error updateConfig={updateConfig} config={config} />
@@ -190,6 +190,13 @@ const EditorPanel = memo(props => {
190
190
  placeholder='Chart Title'
191
191
  updateField={updateField}
192
192
  />
193
+ <InputCheckbox
194
+ size='small'
195
+ label='show title'
196
+ value={config.showTitle}
197
+ fieldName='showTitle'
198
+ updateField={updateField}
199
+ />
193
200
  <InputText
194
201
  type='textarea'
195
202
  value={config.content}
@@ -1,5 +1,6 @@
1
1
  export default {
2
2
  title: 'Chart Title',
3
+ showTitle: true,
3
4
  visualizationType: 'Waffle',
4
5
  visualizationSubType: 'linear',
5
6
  showPercent: true,
package/src/index.jsx CHANGED
@@ -1,11 +1,11 @@
1
1
  import React from 'react'
2
2
  import ReactDOM from 'react-dom/client'
3
3
 
4
- import CdcWaffleChart from './CdcWaffleChart'
5
-
6
4
  import '@cdc/core/styles/cove-main.scss'
7
5
  import './coreStyles_wafflechart.scss'
8
6
 
7
+ import CdcWaffleChart from './CdcWaffleChart'
8
+
9
9
  let isEditor = window.location.href.includes('editor=true')
10
10
 
11
11
  let domContainer = document.getElementsByClassName('react-container')[0]
@@ -33,6 +33,7 @@ export type Config = {
33
33
  suffix: string
34
34
  theme: ComponentThemes
35
35
  title: string
36
+ showTitle: boolean
36
37
  type: 'waffle-chart'
37
38
  valueDescription: string
38
39
  visual: ComponentStyles