@sis-cc/dotstatsuite-visions 7.22.0 → 7.22.2

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.
@@ -138,13 +138,18 @@ var DataHeader = function DataHeader(_ref5) {
138
138
 
139
139
  return React.createElement(
140
140
  'div',
141
- { className: classes.header, ref: target },
141
+ { className: classes.header, ref: target, 'data-testid': 'data-header' },
142
142
  React.createElement(
143
143
  'div',
144
144
  { className: cx(classes.container, (_cx = {}, _cx[classes.sticky] = isSticky, _cx)) },
145
145
  isWidthUp(T4_BREAKPOINTS.xs2) && title && React.createElement(
146
146
  Typography,
147
- { variant: 'h1', className: classes.title },
147
+ {
148
+ variant: 'h1',
149
+ className: classes.title,
150
+ 'data-testid': 'data-header-title',
151
+ 'aria-label': title.label
152
+ },
148
153
  title.label,
149
154
  !R.isNil(SideIcon) && React.createElement(
150
155
  'span',
@@ -159,7 +164,12 @@ var DataHeader = function DataHeader(_ref5) {
159
164
  R.pipe(R.addIndex(R.map)(function (sub, index) {
160
165
  return React.createElement(
161
166
  'div',
162
- { key: 'subtitle-' + index, className: classes.subtitle },
167
+ {
168
+ key: 'subtitle-' + index,
169
+ className: classes.subtitle,
170
+ 'data-testid': 'data-header-subtitle',
171
+ 'aria-label': sub.header
172
+ },
163
173
  React.createElement(Title, { header: sub.header }),
164
174
  React.createElement(
165
175
  Typography,
@@ -177,7 +187,7 @@ var DataHeader = function DataHeader(_ref5) {
177
187
  ),
178
188
  isWidthUp(T4_BREAKPOINTS.xs3) && uprs && React.createElement(
179
189
  Typography,
180
- { className: classes.subtitle },
190
+ { className: classes.subtitle, 'data-testid': 'data-header-units' },
181
191
  React.createElement(Title, { header: uprs.header }),
182
192
  uprs.label
183
193
  ),
@@ -322,7 +322,10 @@ var Dataflow = function Dataflow(_ref2) {
322
322
  mapIndexed(function (category, idx) {
323
323
  return R.is(Array)(category) ? React.createElement(
324
324
  Tooltip,
325
- { key: 'category-tooltip-value-' + idx, title: R.join(' > ', category) },
325
+ {
326
+ key: 'category-tooltip-value-' + idx,
327
+ title: R.join(' > ', category)
328
+ },
326
329
  React.createElement(
327
330
  'span',
328
331
  null,
@@ -83,7 +83,11 @@ var Header = function Header(_ref) {
83
83
  },
84
84
  React.createElement(
85
85
  'div',
86
- { className: classes.cellContentRight },
86
+ {
87
+ className: classes.cellContentRight,
88
+ 'aria-label': R.path([0, 'data', index, 'dimension', 'id'], headerData),
89
+ 'data-testid': 'header-dim'
90
+ },
87
91
  React.createElement(
88
92
  Typography,
89
93
  { variant: 'body1', className: classes.cellLabelHeader },
@@ -105,7 +105,9 @@ var SectionHeader = function SectionHeader(_ref) {
105
105
  variant: 'body1',
106
106
  component: 'span',
107
107
  tabIndex: 0,
108
- className: classes.label
108
+ className: classes.label,
109
+ 'data-testid': 'section-dim',
110
+ 'aria-label': R.path(['dimension', 'id'], sectionHeader)
109
111
  },
110
112
  R.path(['dimension', 'label'], sectionHeader),
111
113
  ':'
@@ -115,7 +117,10 @@ var SectionHeader = function SectionHeader(_ref) {
115
117
  { noWrap: true, variant: 'body1', component: 'span', tabIndex: 0 },
116
118
  R.path(['value', 'label'], sectionHeader)
117
119
  ),
118
- React.createElement(Flags, { flags: R.path(['value', 'flags'], sectionHeader) })
120
+ React.createElement(Flags, {
121
+ HTMLRenderer: HTMLRenderer,
122
+ flags: R.path(['value', 'flags'], sectionHeader)
123
+ })
119
124
  );
120
125
  }, R.path([0, 'data'], section)),
121
126
  React.createElement(
@@ -75,7 +75,11 @@ var SubHeader = React.forwardRef(function (_ref, refs) {
75
75
  },
76
76
  React.createElement(
77
77
  'div',
78
- { className: classes.cellContent },
78
+ {
79
+ className: classes.cellContent,
80
+ 'aria-label': R.path(['dimension', 'id'], rowItem),
81
+ 'data-testid': 'row-dim'
82
+ },
79
83
  React.createElement(
80
84
  Typography,
81
85
  { variant: 'body1', tabIndex: 0, className: classes.label },
@@ -83,6 +83,7 @@ var Box = function Box(_ref2) {
83
83
  return React.createElement(
84
84
  'div',
85
85
  {
86
+ 'data-testid': 'droppable-' + dropZoneLabel,
86
87
  ref: provided.innerRef,
87
88
  className: cx(classes.blockDnd, R.prop(dropZoneLabel + 'Container')(classes), (_cx = {}, _cx[classes.canDrop] = snapshot.isDraggingOver, _cx))
88
89
  },
@@ -83,6 +83,7 @@ var DnDItem = function DnDItem(_ref2) {
83
83
  return React.createElement(
84
84
  'div',
85
85
  _extends({
86
+ 'data-testid': 'draggable-' + item.id,
86
87
  ref: provided.innerRef
87
88
  }, provided.draggableProps, provided.dragHandleProps, {
88
89
  className: cx(classes.styledItemContainer, classes.containerButton, [R.prop(dropZoneLabel + 'Item')(classes)], (_cx = {}, _cx[classes.cantMove] = R.not(canDrag), _cx)),
@@ -274,7 +274,7 @@ var TableLayout = function TableLayout(_ref) {
274
274
  R.map(function (button) {
275
275
  return React.createElement(
276
276
  Grid,
277
- { item: true, key: button.id },
277
+ { item: true, key: button.id, 'data-testid': button['data-testid'] },
278
278
  React.createElement(
279
279
  Button,
280
280
  _extends({ 'aria-label': button.label, color: 'primary' }, button),
@@ -285,14 +285,21 @@ var TableLayout = function TableLayout(_ref) {
285
285
  )
286
286
  )
287
287
  );
288
- })([{ id: 2, label: labels.cancel, onClick: onCancel, startIcon: React.createElement(Undo, null) }, {
288
+ })([{
289
+ id: 2,
290
+ label: labels.cancel,
291
+ onClick: onCancel,
292
+ startIcon: React.createElement(Undo, null),
293
+ 'datatest-id': 'table-layout-cancel'
294
+ }, {
289
295
  id: 1,
290
296
  label: labels.commit,
291
297
  onClick: onCommit,
292
298
  startIcon: React.createElement(Done, null),
293
299
  variant: 'contained',
294
300
  alternative: 'siscc',
295
- className: classes.applyButton
301
+ className: classes.applyButton,
302
+ 'data-testid': 'table-layout-apply'
296
303
  }])
297
304
  )
298
305
  );
@@ -177,13 +177,18 @@ var DataHeader = function DataHeader(_ref5) {
177
177
 
178
178
  return _react2.default.createElement(
179
179
  'div',
180
- { className: classes.header, ref: target },
180
+ { className: classes.header, ref: target, 'data-testid': 'data-header' },
181
181
  _react2.default.createElement(
182
182
  'div',
183
183
  { className: (0, _classnames2.default)(classes.container, (_cx = {}, _cx[classes.sticky] = isSticky, _cx)) },
184
184
  isWidthUp(_theme.T4_BREAKPOINTS.xs2) && title && _react2.default.createElement(
185
185
  _Typography2.default,
186
- { variant: 'h1', className: classes.title },
186
+ {
187
+ variant: 'h1',
188
+ className: classes.title,
189
+ 'data-testid': 'data-header-title',
190
+ 'aria-label': title.label
191
+ },
187
192
  title.label,
188
193
  !R.isNil(SideIcon) && _react2.default.createElement(
189
194
  'span',
@@ -198,7 +203,12 @@ var DataHeader = function DataHeader(_ref5) {
198
203
  R.pipe(R.addIndex(R.map)(function (sub, index) {
199
204
  return _react2.default.createElement(
200
205
  'div',
201
- { key: 'subtitle-' + index, className: classes.subtitle },
206
+ {
207
+ key: 'subtitle-' + index,
208
+ className: classes.subtitle,
209
+ 'data-testid': 'data-header-subtitle',
210
+ 'aria-label': sub.header
211
+ },
202
212
  _react2.default.createElement(_Title2.default, { header: sub.header }),
203
213
  _react2.default.createElement(
204
214
  _Typography2.default,
@@ -216,7 +226,7 @@ var DataHeader = function DataHeader(_ref5) {
216
226
  ),
217
227
  isWidthUp(_theme.T4_BREAKPOINTS.xs3) && uprs && _react2.default.createElement(
218
228
  _Typography2.default,
219
- { className: classes.subtitle },
229
+ { className: classes.subtitle, 'data-testid': 'data-header-units' },
220
230
  _react2.default.createElement(_Title2.default, { header: uprs.header }),
221
231
  uprs.label
222
232
  ),
@@ -383,7 +383,10 @@ var Dataflow = function Dataflow(_ref2) {
383
383
  mapIndexed(function (category, idx) {
384
384
  return R.is(Array)(category) ? _react2.default.createElement(
385
385
  _Tooltip2.default,
386
- { key: 'category-tooltip-value-' + idx, title: R.join(' > ', category) },
386
+ {
387
+ key: 'category-tooltip-value-' + idx,
388
+ title: R.join(' > ', category)
389
+ },
387
390
  _react2.default.createElement(
388
391
  'span',
389
392
  null,
@@ -116,7 +116,11 @@ var Header = function Header(_ref) {
116
116
  },
117
117
  _react2.default.createElement(
118
118
  'div',
119
- { className: classes.cellContentRight },
119
+ {
120
+ className: classes.cellContentRight,
121
+ 'aria-label': R.path([0, 'data', index, 'dimension', 'id'], headerData),
122
+ 'data-testid': 'header-dim'
123
+ },
120
124
  _react2.default.createElement(
121
125
  _Typography2.default,
122
126
  { variant: 'body1', className: classes.cellLabelHeader },
@@ -141,7 +141,9 @@ var SectionHeader = function SectionHeader(_ref) {
141
141
  variant: 'body1',
142
142
  component: 'span',
143
143
  tabIndex: 0,
144
- className: classes.label
144
+ className: classes.label,
145
+ 'data-testid': 'section-dim',
146
+ 'aria-label': R.path(['dimension', 'id'], sectionHeader)
145
147
  },
146
148
  R.path(['dimension', 'label'], sectionHeader),
147
149
  ':'
@@ -151,7 +153,10 @@ var SectionHeader = function SectionHeader(_ref) {
151
153
  { noWrap: true, variant: 'body1', component: 'span', tabIndex: 0 },
152
154
  R.path(['value', 'label'], sectionHeader)
153
155
  ),
154
- _react2.default.createElement(_flags2.default, { flags: R.path(['value', 'flags'], sectionHeader) })
156
+ _react2.default.createElement(_flags2.default, {
157
+ HTMLRenderer: HTMLRenderer,
158
+ flags: R.path(['value', 'flags'], sectionHeader)
159
+ })
155
160
  );
156
161
  }, R.path([0, 'data'], section)),
157
162
  _react2.default.createElement(
@@ -108,7 +108,11 @@ var SubHeader = _react2.default.forwardRef(function (_ref, refs) {
108
108
  },
109
109
  _react2.default.createElement(
110
110
  'div',
111
- { className: classes.cellContent },
111
+ {
112
+ className: classes.cellContent,
113
+ 'aria-label': R.path(['dimension', 'id'], rowItem),
114
+ 'data-testid': 'row-dim'
115
+ },
112
116
  _react2.default.createElement(
113
117
  _Typography2.default,
114
118
  { variant: 'body1', tabIndex: 0, className: classes.label },
@@ -116,6 +116,7 @@ var Box = function Box(_ref2) {
116
116
  return _react2.default.createElement(
117
117
  'div',
118
118
  {
119
+ 'data-testid': 'droppable-' + dropZoneLabel,
119
120
  ref: provided.innerRef,
120
121
  className: (0, _classnames2.default)(classes.blockDnd, R.prop(dropZoneLabel + 'Container')(classes), (_cx = {}, _cx[classes.canDrop] = snapshot.isDraggingOver, _cx))
121
122
  },
@@ -116,6 +116,7 @@ var DnDItem = function DnDItem(_ref2) {
116
116
  return _react2.default.createElement(
117
117
  'div',
118
118
  _extends({
119
+ 'data-testid': 'draggable-' + item.id,
119
120
  ref: provided.innerRef
120
121
  }, provided.draggableProps, provided.dragHandleProps, {
121
122
  className: (0, _classnames2.default)(classes.styledItemContainer, classes.containerButton, [R.prop(dropZoneLabel + 'Item')(classes)], (_cx = {}, _cx[classes.cantMove] = R.not(canDrag), _cx)),
@@ -330,7 +330,7 @@ var TableLayout = function TableLayout(_ref) {
330
330
  R.map(function (button) {
331
331
  return _react2.default.createElement(
332
332
  _Grid2.default,
333
- { item: true, key: button.id },
333
+ { item: true, key: button.id, 'data-testid': button['data-testid'] },
334
334
  _react2.default.createElement(
335
335
  _.Button,
336
336
  _extends({ 'aria-label': button.label, color: 'primary' }, button),
@@ -341,14 +341,21 @@ var TableLayout = function TableLayout(_ref) {
341
341
  )
342
342
  )
343
343
  );
344
- })([{ id: 2, label: labels.cancel, onClick: onCancel, startIcon: _react2.default.createElement(_Undo2.default, null) }, {
344
+ })([{
345
+ id: 2,
346
+ label: labels.cancel,
347
+ onClick: onCancel,
348
+ startIcon: _react2.default.createElement(_Undo2.default, null),
349
+ 'datatest-id': 'table-layout-cancel'
350
+ }, {
345
351
  id: 1,
346
352
  label: labels.commit,
347
353
  onClick: onCommit,
348
354
  startIcon: _react2.default.createElement(_Done2.default, null),
349
355
  variant: 'contained',
350
356
  alternative: 'siscc',
351
- className: classes.applyButton
357
+ className: classes.applyButton,
358
+ 'data-testid': 'table-layout-apply'
352
359
  }])
353
360
  )
354
361
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sis-cc/dotstatsuite-visions",
3
- "version": "7.22.0",
3
+ "version": "7.22.2",
4
4
  "description": "Library of visual components",
5
5
  "author": "OECD",
6
6
  "homepage": "https://visions-qa.siscc.org/#o",