@sis-cc/dotstatsuite-visions 7.6.2 → 7.8.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.
@@ -114,7 +114,8 @@ var Section = function Section(_ref) {
114
114
  sectionIndex = _ref.sectionIndex,
115
115
  nbColumnsByRows = _ref.nbColumnsByRows,
116
116
  SideIcon = _ref.SideIcon,
117
- subHeadCellsWidth = _ref.subHeadCellsWidth;
117
+ subHeadCellsWidth = _ref.subHeadCellsWidth,
118
+ HTMLRenderer = _ref.HTMLRenderer;
118
119
 
119
120
  var classes = useStyles();
120
121
  var currentSection = R.path([0, 'key'], section);
@@ -132,7 +133,8 @@ var Section = function Section(_ref) {
132
133
  currentSection: currentSection,
133
134
  xLayoutDataLength: xLayoutDataLength,
134
135
  headerHeight: headerHeight,
135
- SideIcon: SideIcon
136
+ SideIcon: SideIcon,
137
+ HTMLRenderer: HTMLRenderer
136
138
  }),
137
139
  R.map(function (sectionbody) {
138
140
  var _cx2;
@@ -179,7 +181,7 @@ var Section = function Section(_ref) {
179
181
  _Typography2.default,
180
182
  { variant: 'body1', tabIndex: 0 },
181
183
  R.path(['value', 'label'], cell),
182
- _react2.default.createElement(_flags2.default, { flags: flags })
184
+ _react2.default.createElement(_flags2.default, { HTMLRenderer: HTMLRenderer, flags: flags })
183
185
  )
184
186
  )
185
187
  );
@@ -194,7 +196,7 @@ var Section = function Section(_ref) {
194
196
  'div',
195
197
  { className: classes.flagContainer },
196
198
  !R.isNil(SideIcon) && _react2.default.createElement(SideIcon, { sideProps: R.prop('sideProps', sectionbody) }),
197
- _react2.default.createElement(_flags2.default, { flags: R.prop('flags', sectionbody) })
199
+ _react2.default.createElement(_flags2.default, { HTMLRenderer: HTMLRenderer, flags: R.prop('flags', sectionbody) })
198
200
  )
199
201
  ),
200
202
  mapIndexed(function (item, columnIndex) {
@@ -210,6 +212,7 @@ var Section = function Section(_ref) {
210
212
  }, R.pathOr({ value: '..' }, [item.key, currentSection, sectionbody.key, 0], cells), {
211
213
  headers: rowIds + ' ' + columnIds + ' ' + currentSection,
212
214
  cellHandler: cellHandler,
215
+ HTMLRenderer: HTMLRenderer,
213
216
  SideIcon: SideIcon,
214
217
  isActive: isActive,
215
218
  isHighlight: R.any(R.identity)([R.prop(rowId)(activeCellIds), R.prop(columnIndex)(activeCellIds)]),
@@ -239,7 +242,8 @@ Section.propTypes = process.env.NODE_ENV !== "production" ? {
239
242
  nbColumnsByRows: _propTypes2.default.array,
240
243
  maxColumns: _propTypes2.default.number,
241
244
  SideIcon: _propTypes2.default.func,
242
- subHeadCellsWidth: _propTypes2.default.arrayOf(_propTypes2.default.number)
245
+ subHeadCellsWidth: _propTypes2.default.arrayOf(_propTypes2.default.number),
246
+ HTMLRenderer: _propTypes2.default.func
243
247
  } : {};
244
248
 
245
249
  exports.default = Section;
@@ -101,7 +101,8 @@ var SectionHeader = function SectionHeader(_ref) {
101
101
  currentSection = _ref.currentSection,
102
102
  xLayoutDataLength = _ref.xLayoutDataLength,
103
103
  headerHeight = _ref.headerHeight,
104
- SideIcon = _ref.SideIcon;
104
+ SideIcon = _ref.SideIcon,
105
+ HTMLRenderer = _ref.HTMLRenderer;
105
106
 
106
107
  var classes = useStyles();
107
108
  if (R.compose(R.anyPass([R.isNil, R.isEmpty]), R.path([0, 'data']))(section)) return null;
@@ -161,7 +162,7 @@ var SectionHeader = function SectionHeader(_ref) {
161
162
  className: (0, _classnames2.default)(classes.flag, classes.stickyHeaderSection, classes.rightLabelPosition, classes.sectionLabelsContainer)
162
163
  },
163
164
  !R.isNil(SideIcon) && _react2.default.createElement(SideIcon, { sideProps: R.path([0, 'sideProps'], section) }),
164
- _react2.default.createElement(_flags2.default, { flags: R.path([0, 'flags'], section) })
165
+ _react2.default.createElement(_flags2.default, { HTMLRenderer: HTMLRenderer, flags: R.path([0, 'flags'], section) })
165
166
  )
166
167
  )
167
168
  )
@@ -174,7 +175,8 @@ SectionHeader.propTypes = process.env.NODE_ENV !== "production" ? {
174
175
  currentSection: _propTypes2.default.string,
175
176
  xLayoutDataLength: _propTypes2.default.number,
176
177
  headerHeight: _propTypes2.default.number,
177
- SideIcon: _propTypes2.default.func
178
+ SideIcon: _propTypes2.default.func,
179
+ HTMLRenderer: _propTypes2.default.func
178
180
  } : {};
179
181
 
180
182
  exports.default = SectionHeader;
@@ -84,7 +84,8 @@ var SubHeader = _react2.default.forwardRef(function (_ref, refs) {
84
84
  xLayoutData = _ref.xLayoutData,
85
85
  activeCellIds = _ref.activeCellIds,
86
86
  subHeadCellsWidth = _ref.subHeadCellsWidth,
87
- SideIcon = _ref.SideIcon;
87
+ SideIcon = _ref.SideIcon,
88
+ HTMLRenderer = _ref.HTMLRenderer;
88
89
 
89
90
  var classes = useStyles();
90
91
  var theme = (0, _styles.useTheme)();
@@ -112,7 +113,10 @@ var SubHeader = _react2.default.forwardRef(function (_ref, refs) {
112
113
  _Typography2.default,
113
114
  { variant: 'body1', tabIndex: 0, className: classes.label },
114
115
  R.path(['dimension', 'label'], rowItem),
115
- _react2.default.createElement(_flags2.default, { flags: R.path(['dimension', 'flags'], rowItem) })
116
+ _react2.default.createElement(_flags2.default, {
117
+ HTMLRenderer: HTMLRenderer,
118
+ flags: R.path(['dimension', 'flags'], rowItem)
119
+ })
116
120
  )
117
121
  )
118
122
  );
@@ -142,7 +146,8 @@ SubHeader.propTypes = process.env.NODE_ENV !== "production" ? {
142
146
  headerData: _propTypes2.default.array,
143
147
  xLayoutData: _propTypes2.default.array,
144
148
  SideIcon: _propTypes2.default.func,
145
- subHeadCellsWidth: _propTypes2.default.arrayOf(_propTypes2.default.number)
149
+ subHeadCellsWidth: _propTypes2.default.arrayOf(_propTypes2.default.number),
150
+ HTMLRenderer: _propTypes2.default.func
146
151
  } : {};
147
152
 
148
153
  exports.default = SubHeader;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sis-cc/dotstatsuite-visions",
3
- "version": "7.6.2",
3
+ "version": "7.8.1",
4
4
  "description": "Library of visual components",
5
5
  "author": "OECD",
6
6
  "homepage": "https://visions-qa.siscc.org/#o",
@@ -80,6 +80,7 @@
80
80
  "react-helmet": "^5.2.1",
81
81
  "react-scrollable-anchor": "^0.6.1",
82
82
  "react-syntax-highlighter": "^10.2.1",
83
+ "sanitize-html": "^2.7.0",
83
84
  "webpack": "^5.68.0",
84
85
  "webpack-cli": "^4.9.2",
85
86
  "webpack-dev-server": "^4.7.4"