@cdc/markup-include 4.24.9-1 → 4.24.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdc/markup-include",
3
- "version": "4.24.9-1",
3
+ "version": "4.24.10",
4
4
  "description": "React component for displaying HTML content from an outside link",
5
5
  "moduleName": "CdcMarkupInclude",
6
6
  "main": "dist/cdcmarkupinclude",
@@ -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.24.9-1",
30
+ "@cdc/core": "^4.24.10",
31
31
  "axios": "^1.6.0",
32
32
  "chroma": "0.0.1",
33
33
  "chroma-js": "^2.1.0",
@@ -39,5 +39,5 @@
39
39
  "react": "^18.2.0",
40
40
  "react-dom": "^18.2.0"
41
41
  },
42
- "gitHead": "4a77c2fa79c8fa6074da3b6dfee3d8e32f0b2586"
42
+ "gitHead": "a4d88d1bc91f596e1b0307d8e25c57ad8c668b75"
43
43
  }
@@ -172,7 +172,9 @@ const CdcMarkupInclude: React.FC<CdcMarkupIncludeProps> = ({
172
172
  ? data
173
173
  : filterOutConditions(data, [...workingVariable.conditions])
174
174
 
175
- const variableValues: string[] = _.uniq(workingData?.map(dataObject => dataObject[workingVariable.columnName]))
175
+ const variableValues: string[] = _.uniq(
176
+ (workingData || []).map(dataObject => dataObject[workingVariable.columnName])
177
+ )
176
178
  const variableDisplay = []
177
179
 
178
180
  const listConjunction = !isEditor ? 'and' : 'or'
@@ -193,12 +195,7 @@ const CdcMarkupInclude: React.FC<CdcMarkupIncludeProps> = ({
193
195
  finalDisplay = finalDisplay.toLocaleString('en-US', { useGrouping: true })
194
196
  }
195
197
 
196
- const displayInfoMessage =
197
- '<span class="font-weight-bold display-Info-message">One or more of the following values will appear in the place of this variable placeholder:</span>'
198
-
199
- const newReplacementForVariable = `<span class="cove-tooltip-variable">${variableTag}<span class="cove-tooltip-value">${displayInfoMessage}<br/>${finalDisplay}</span></span><span class="cove-markup-include-variable-value">${finalDisplay}</span>`
200
-
201
- return newReplacementForVariable
198
+ return finalDisplay
202
199
  })
203
200
  return convertedInlineMarkup
204
201
  }
@@ -0,0 +1 @@
1
+ @import '@cdc/core/styles/base';
package/src/index.jsx CHANGED
@@ -5,6 +5,8 @@ import { GlobalContextProvider } from '@cdc/core/components/GlobalContext'
5
5
 
6
6
  import CdcMarkupInclude from './CdcMarkupInclude'
7
7
 
8
+ import './coreStyles_markupinclude.scss'
9
+
8
10
  let isEditor = window.location.href.includes('editor=true')
9
11
 
10
12
  let domContainer = document.getElementsByClassName('react-container')[0]
@@ -14,5 +16,5 @@ ReactDOM.createRoot(domContainer).render(
14
16
  <GlobalContextProvider>
15
17
  <CdcMarkupInclude configUrl={domContainer.attributes['data-config'].value} isEditor={isEditor} />
16
18
  </GlobalContextProvider>
17
- </React.StrictMode>,
19
+ </React.StrictMode>
18
20
  )
@@ -1,5 +1,3 @@
1
- @import '@cdc/core/styles/base';
2
-
3
1
  .markup-include {
4
2
  .checkbox-group {
5
3
  padding: 16px;