@cdc/data-bite 4.25.2-25 → 4.25.3

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/data-bite",
3
- "version": "4.25.2-25",
3
+ "version": "4.25.3",
4
4
  "description": "React component for displaying a single piece of data in a card module",
5
5
  "moduleName": "CdcDataBite",
6
6
  "main": "dist/cdcdatabite",
@@ -27,7 +27,7 @@
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.2-25",
30
+ "@cdc/core": "^4.25.3",
31
31
  "chroma": "0.0.1",
32
32
  "chroma-js": "^2.1.0",
33
33
  "html-react-parser": "^3.0.8",
@@ -40,5 +40,5 @@
40
40
  "react": "^18.2.0",
41
41
  "react-dom": "^18.2.0"
42
42
  },
43
- "gitHead": "f00bd8a0fc746def7cc23b91ef49a03a3ceac65e"
43
+ "gitHead": "b09566f5a7d57c8d0109e5f407257729d6b36846"
44
44
  }
@@ -546,6 +546,7 @@ const CdcDataBite = (props: CdcDataBiteProps) => {
546
546
  {!config.newViz && config.runtime && config.runtime.editorErrorMessage && <Error />}
547
547
  {(!config.dataColumn || !config.dataFunction) && <Confirm />}
548
548
  <Title
549
+ showTitle={config.visual?.showTitle}
549
550
  config={config}
550
551
  title={title}
551
552
  isDashboard={isDashboard}
@@ -1,5 +1,5 @@
1
1
  import React, { memo, useContext, useEffect, useState } from 'react'
2
-
2
+ import _ from 'lodash'
3
3
  import {
4
4
  Accordion,
5
5
  AccordionItem,
@@ -212,7 +212,7 @@ const EditorPanel = memo(() => {
212
212
  }
213
213
 
214
214
  const convertStateToConfig = () => {
215
- let strippedState = JSON.parse(JSON.stringify(config))
215
+ let strippedState = _.cloneDeep(config)
216
216
  //if(false === missingRequiredSections()) {
217
217
  //strippedState.newViz
218
218
  //}
@@ -357,6 +357,14 @@ const EditorPanel = memo(() => {
357
357
  placeholder='Data Bite Title'
358
358
  updateField={updateField}
359
359
  />
360
+ <CheckBox
361
+ value={config.visual?.showTitle}
362
+ section='visual'
363
+ checked={config.visual?.showTitle}
364
+ fieldName='showTitle'
365
+ label='Show Title'
366
+ updateField={updateField}
367
+ />
360
368
 
361
369
  <TextField
362
370
  type='textarea'
@@ -31,7 +31,8 @@ export default {
31
31
  accent: false,
32
32
  background: false,
33
33
  hideBackgroundColor: false,
34
- borderColorTheme: false
34
+ borderColorTheme: false,
35
+ showTitle: true
35
36
  },
36
37
  general: {
37
38
  isCompactStyle: false
@@ -34,6 +34,7 @@ export type Config = {
34
34
  background: boolean
35
35
  hideBackgroundColor: boolean
36
36
  borderColorTheme: boolean
37
+ showTitle: boolean
37
38
  }
38
39
  general: {
39
40
  isCompactStyle: boolean