@sis-cc/dotstatsuite-visions 10.14.0 → 10.15.0
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/es/Chips/CustomChip.js +69 -33
- package/es/Chips/GroupedChips.js +7 -3
- package/es/Chips/utils.js +7 -0
- package/es/DataFooter/DataFooter.js +4 -7
- package/es/ExpansionPanel/ExpansionPanel.js +1 -1
- package/es/HierarchicalFilter/HierarchicalFilter.js +7 -3
- package/es/TableHtml5/flags.js +27 -2
- package/es/TableHtml5/section.js +1 -1
- package/es/Tag/Tag.js +5 -3
- package/es/VirtualizedTree/Item.js +21 -5
- package/es/VirtualizedTree/VirtualizedTree.js +6 -9
- package/lib/Chips/CustomChip.js +67 -31
- package/lib/Chips/GroupedChips.js +7 -3
- package/lib/Chips/utils.js +8 -1
- package/lib/DataFooter/DataFooter.js +4 -7
- package/lib/ExpansionPanel/ExpansionPanel.js +1 -1
- package/lib/HierarchicalFilter/HierarchicalFilter.js +7 -3
- package/lib/TableHtml5/flags.js +26 -1
- package/lib/TableHtml5/section.js +1 -1
- package/lib/Tag/Tag.js +5 -3
- package/lib/VirtualizedTree/Item.js +20 -4
- package/lib/VirtualizedTree/VirtualizedTree.js +6 -12
- package/package.json +1 -1
- package/umd/@sis-cc/dotstatsuite-visions.js +446 -358
- package/umd/@sis-cc/dotstatsuite-visions.min.js +10 -10
- package/umd/@sis-cc/dotstatsuite-visions.min.js.map +1 -1
|
@@ -148,6 +148,7 @@ var DataFooter = function DataFooter(_ref3) {
|
|
|
148
148
|
{ variant: 'body2' },
|
|
149
149
|
copyright.content
|
|
150
150
|
),
|
|
151
|
+
'aria-label': copyright.content,
|
|
151
152
|
variant: 'light',
|
|
152
153
|
tabIndex: 0,
|
|
153
154
|
'aria-hidden': false,
|
|
@@ -161,7 +162,8 @@ var DataFooter = function DataFooter(_ref3) {
|
|
|
161
162
|
{
|
|
162
163
|
variant: 'body2',
|
|
163
164
|
className: classes.typo,
|
|
164
|
-
style: { cursor: 'pointer' }
|
|
165
|
+
style: { cursor: 'pointer' },
|
|
166
|
+
role: 'button'
|
|
165
167
|
},
|
|
166
168
|
copyright.label
|
|
167
169
|
)
|
|
@@ -181,12 +183,7 @@ var DataFooter = function DataFooter(_ref3) {
|
|
|
181
183
|
{ variant: 'body2', className: classes.typo },
|
|
182
184
|
_react2.default.createElement(
|
|
183
185
|
_Link2.default,
|
|
184
|
-
{
|
|
185
|
-
href: source.link,
|
|
186
|
-
rel: 'noopener noreferrer',
|
|
187
|
-
target: '_blank',
|
|
188
|
-
variant: 'body2'
|
|
189
|
-
},
|
|
186
|
+
{ href: source.link, rel: 'noopener noreferrer', target: '_blank', variant: 'body2' },
|
|
190
187
|
source.label
|
|
191
188
|
)
|
|
192
189
|
)
|
|
@@ -112,7 +112,7 @@ var CustomExpansionPanel = function CustomExpansionPanel(_ref) {
|
|
|
112
112
|
expandIcon: _react2.default.createElement(_ExpandMore2.default, null),
|
|
113
113
|
'aria-controls': id,
|
|
114
114
|
id: id,
|
|
115
|
-
'aria-label': label
|
|
115
|
+
'aria-label': isPinned ? label + ' ' + pinnedLabel + ' ' : label
|
|
116
116
|
},
|
|
117
117
|
_react2.default.createElement(
|
|
118
118
|
_Grid2.default,
|
|
@@ -75,6 +75,7 @@ var HierarchicalFilter = function HierarchicalFilter(props) {
|
|
|
75
75
|
label = props.label,
|
|
76
76
|
labels = props.labels,
|
|
77
77
|
tagAccessor = props.tagAccessor,
|
|
78
|
+
tagAriaLabel = props.tagAriaLabel,
|
|
78
79
|
expandedIds = props.expandedIds,
|
|
79
80
|
spotlight = props.spotlight,
|
|
80
81
|
setSpotlight = props.setSpotlight,
|
|
@@ -93,6 +94,7 @@ var HierarchicalFilter = function HierarchicalFilter(props) {
|
|
|
93
94
|
var _disableAccessor = simpleSelectionMode ? disableAccessor : (0, _utils.getEvolvedDisableAccessor)(_allGroupedItems, disableAccessor, R.always(false));
|
|
94
95
|
|
|
95
96
|
var tagValue = getCounter(items, _disableAccessor, tagAccessor);
|
|
97
|
+
var tagValueLabel = getCounter(items, _disableAccessor, tagAriaLabel);
|
|
96
98
|
var isDisabled = function isDisabled(item) {
|
|
97
99
|
return R.is(Function, disableAccessor) ? disableAccessor(item) : false;
|
|
98
100
|
};
|
|
@@ -113,12 +115,13 @@ var HierarchicalFilter = function HierarchicalFilter(props) {
|
|
|
113
115
|
label: labelRenderer({ id: id, label: label }),
|
|
114
116
|
onChangeActivePanel: onChangeActivePanel,
|
|
115
117
|
overflow: true,
|
|
118
|
+
tagValueLabel: tagValueLabel,
|
|
116
119
|
topElementComponent: _react2.default.createElement(
|
|
117
120
|
_react.Fragment,
|
|
118
121
|
null,
|
|
119
122
|
_react2.default.createElement(
|
|
120
123
|
_Container2.default,
|
|
121
|
-
{ disableGutters: true, className: classes.spotlightContainer },
|
|
124
|
+
{ disableGutters: true, className: classes.spotlightContainer, role: 'presentation' },
|
|
122
125
|
hasSpotlight && _react2.default.createElement(_.Spotlight, {
|
|
123
126
|
className: { container: classes.middle },
|
|
124
127
|
fullWidth: true,
|
|
@@ -151,7 +154,7 @@ var HierarchicalFilter = function HierarchicalFilter(props) {
|
|
|
151
154
|
),
|
|
152
155
|
tag: _react2.default.createElement(
|
|
153
156
|
Chip,
|
|
154
|
-
{ items: items },
|
|
157
|
+
{ items: items, tagValueLabel: tagValueLabel },
|
|
155
158
|
tagValue
|
|
156
159
|
)
|
|
157
160
|
}, expansionPanelProps),
|
|
@@ -191,7 +194,8 @@ HierarchicalFilter.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
191
194
|
setSpotlight: _propTypes2.default.func,
|
|
192
195
|
hasSpotlight: _propTypes2.default.bool,
|
|
193
196
|
allItems: _propTypes2.default.array,
|
|
194
|
-
simpleSelectionMode: _propTypes2.default.bool
|
|
197
|
+
simpleSelectionMode: _propTypes2.default.bool,
|
|
198
|
+
tagAriaLabel: _propTypes2.default.func
|
|
195
199
|
} : {};
|
|
196
200
|
|
|
197
201
|
exports.default = (0, _withSpotlight.withSpotlight)((0, _withExpansionTree.withExpansionTree)(HierarchicalFilter));
|
package/lib/TableHtml5/flags.js
CHANGED
|
@@ -79,6 +79,23 @@ var Flags = function Flags(_ref) {
|
|
|
79
79
|
|
|
80
80
|
var classes = useStyles();
|
|
81
81
|
var noFlags = R.isNil(flags) || R.isEmpty(flags);
|
|
82
|
+
|
|
83
|
+
var _useState = (0, _react.useState)(false),
|
|
84
|
+
open = _useState[0],
|
|
85
|
+
setOpen = _useState[1];
|
|
86
|
+
|
|
87
|
+
var handler = (0, _react.useCallback)(function (e) {
|
|
88
|
+
if (e.key === 'Escape') {
|
|
89
|
+
setOpen(false);
|
|
90
|
+
}
|
|
91
|
+
}, []);
|
|
92
|
+
|
|
93
|
+
(0, _react.useEffect)(function () {
|
|
94
|
+
document.addEventListener('keydown', handler);
|
|
95
|
+
return function () {
|
|
96
|
+
document.removeEventListener('keydown', handler);
|
|
97
|
+
};
|
|
98
|
+
}, []);
|
|
82
99
|
if (noFlags) return null;
|
|
83
100
|
|
|
84
101
|
var hasUncoded = R.any(R.complement(R.has('code')), flags);
|
|
@@ -108,7 +125,15 @@ var Flags = function Flags(_ref) {
|
|
|
108
125
|
'aria-label': R.join(', ', labels),
|
|
109
126
|
'aria-hidden': false,
|
|
110
127
|
title: content,
|
|
111
|
-
placement: 'top'
|
|
128
|
+
placement: 'top',
|
|
129
|
+
open: open,
|
|
130
|
+
interactive: true,
|
|
131
|
+
onOpen: function onOpen() {
|
|
132
|
+
return setOpen(true);
|
|
133
|
+
},
|
|
134
|
+
onClose: function onClose() {
|
|
135
|
+
return setOpen(false);
|
|
136
|
+
}
|
|
112
137
|
},
|
|
113
138
|
_react2.default.createElement(
|
|
114
139
|
'span',
|
|
@@ -237,7 +237,7 @@ var Section = function Section(_ref) {
|
|
|
237
237
|
return R.isNil(val) ? missingValLabel : cellValueAccessor(val);
|
|
238
238
|
}))(cells), {
|
|
239
239
|
key: intersectionCellId,
|
|
240
|
-
headers: rowIds + ' ' + columnIds + ' ' + currentSection
|
|
240
|
+
headers: rowIds + ' ' + columnIds + ' ' + currentSection,
|
|
241
241
|
cellHandler: cellHandler,
|
|
242
242
|
HTMLRenderer: HTMLRenderer,
|
|
243
243
|
labelAccessor: labelAccessor,
|
package/lib/Tag/Tag.js
CHANGED
|
@@ -38,7 +38,8 @@ var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
|
38
38
|
});
|
|
39
39
|
|
|
40
40
|
var Tag = function Tag(_ref) {
|
|
41
|
-
var children = _ref.children
|
|
41
|
+
var children = _ref.children,
|
|
42
|
+
tagValueLabel = _ref.tagValueLabel;
|
|
42
43
|
|
|
43
44
|
var classes = useStyles();
|
|
44
45
|
|
|
@@ -49,14 +50,15 @@ var Tag = function Tag(_ref) {
|
|
|
49
50
|
null,
|
|
50
51
|
_react2.default.createElement(
|
|
51
52
|
_Typography2.default,
|
|
52
|
-
{ className: classes.tag },
|
|
53
|
+
{ tabIndex: 0, className: classes.tag, 'aria-label': tagValueLabel },
|
|
53
54
|
children
|
|
54
55
|
)
|
|
55
56
|
);
|
|
56
57
|
};
|
|
57
58
|
|
|
58
59
|
Tag.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
59
|
-
children: _propTypes2.default.oneOfType([_propTypes2.default.arrayOf(_propTypes2.default.node), _propTypes2.default.node])
|
|
60
|
+
children: _propTypes2.default.oneOfType([_propTypes2.default.arrayOf(_propTypes2.default.node), _propTypes2.default.node]),
|
|
61
|
+
tagValueLabel: _propTypes2.default.string
|
|
60
62
|
} : {};
|
|
61
63
|
|
|
62
64
|
exports.default = Tag;
|
|
@@ -88,6 +88,20 @@ var Item = function Item(_ref) {
|
|
|
88
88
|
setIsTooltipShown = _React$useState[1];
|
|
89
89
|
|
|
90
90
|
var padding = depth * 30 + (depth > 0 && !hasChildrenOnLevel ? 30 : 0) + (!hasChild && hasChildrenOnLevel ? 30 : 0);
|
|
91
|
+
|
|
92
|
+
var handler = (0, _react.useCallback)(function (e) {
|
|
93
|
+
if (e.key === 'Escape') {
|
|
94
|
+
setIsTooltipShown(false);
|
|
95
|
+
}
|
|
96
|
+
}, []);
|
|
97
|
+
|
|
98
|
+
(0, _react.useEffect)(function () {
|
|
99
|
+
document.addEventListener('keydown', handler);
|
|
100
|
+
return function () {
|
|
101
|
+
document.removeEventListener('keydown', handler);
|
|
102
|
+
};
|
|
103
|
+
}, []);
|
|
104
|
+
|
|
91
105
|
return _react2.default.createElement(
|
|
92
106
|
_ListItem2.default,
|
|
93
107
|
{
|
|
@@ -98,7 +112,8 @@ var Item = function Item(_ref) {
|
|
|
98
112
|
tabIndex: -1,
|
|
99
113
|
style: _extends({}, style, (_extends2 = {
|
|
100
114
|
flexDirection: isRtl ? 'row-reverse' : 'row'
|
|
101
|
-
}, _extends2['' + (isRtl ? 'paddingRight' : 'paddingLeft')] = padding + 'px', _extends2))
|
|
115
|
+
}, _extends2['' + (isRtl ? 'paddingRight' : 'paddingLeft')] = padding + 'px', _extends2)),
|
|
116
|
+
role: 'listitem'
|
|
102
117
|
},
|
|
103
118
|
R.and(NavigateIcon, hasChild) && _react2.default.createElement(
|
|
104
119
|
_IconButton2.default,
|
|
@@ -137,8 +152,7 @@ var Item = function Item(_ref) {
|
|
|
137
152
|
primary: _react2.default.createElement(
|
|
138
153
|
'div',
|
|
139
154
|
{
|
|
140
|
-
className: (0, _classnames2.default)(classes.labelContainer, (_cx2 = {}, _cx2[classes.rtlLabelContainer] = isRtl, _cx2))
|
|
141
|
-
style: { pointerEvents: 'none' }
|
|
155
|
+
className: (0, _classnames2.default)(classes.labelContainer, (_cx2 = {}, _cx2[classes.rtlLabelContainer] = isRtl, _cx2))
|
|
142
156
|
},
|
|
143
157
|
_react2.default.createElement(
|
|
144
158
|
_SvgIcon2.default,
|
|
@@ -175,7 +189,9 @@ var Item = function Item(_ref) {
|
|
|
175
189
|
},
|
|
176
190
|
onClose: function onClose() {
|
|
177
191
|
return setIsTooltipShown(false);
|
|
178
|
-
}
|
|
192
|
+
},
|
|
193
|
+
disableHoverListener: R.isEmpty(description),
|
|
194
|
+
open: isTooltipShown
|
|
179
195
|
},
|
|
180
196
|
_react2.default.createElement(
|
|
181
197
|
_Typography2.default,
|
|
@@ -33,10 +33,6 @@ var _ExpandLess = require('@material-ui/icons/ExpandLess');
|
|
|
33
33
|
|
|
34
34
|
var _ExpandLess2 = _interopRequireDefault(_ExpandLess);
|
|
35
35
|
|
|
36
|
-
var _List3 = require('@material-ui/core/List');
|
|
37
|
-
|
|
38
|
-
var _List4 = _interopRequireDefault(_List3);
|
|
39
|
-
|
|
40
36
|
var _Item = require('./Item');
|
|
41
37
|
|
|
42
38
|
var _Item2 = _interopRequireDefault(_Item);
|
|
@@ -317,25 +313,24 @@ var VirtualizedTree = function VirtualizedTree(props) {
|
|
|
317
313
|
}
|
|
318
314
|
var isRtl = (0, _utils2.getIsRtl)(theme);
|
|
319
315
|
return _react2.default.createElement(
|
|
320
|
-
|
|
316
|
+
'div',
|
|
321
317
|
{
|
|
322
|
-
disablePadding: true,
|
|
323
318
|
style: { height: maxHeight + 2 },
|
|
324
319
|
onKeyUp: onKeyUp,
|
|
325
320
|
onMouseUp: onMouseUp,
|
|
326
321
|
onMouseLeave: onMouseLeave,
|
|
327
|
-
ref: ref
|
|
322
|
+
ref: ref,
|
|
323
|
+
role: 'presentation'
|
|
328
324
|
},
|
|
329
325
|
_react2.default.createElement(
|
|
330
326
|
_AutoSizer2.default,
|
|
331
|
-
|
|
327
|
+
null,
|
|
332
328
|
function (_ref) {
|
|
333
329
|
var height = _ref.height,
|
|
334
330
|
width = _ref.width;
|
|
335
331
|
return _react2.default.createElement(_List2.default, {
|
|
332
|
+
containerRole: 'list',
|
|
336
333
|
role: 'presentation',
|
|
337
|
-
'aria-readonly': null,
|
|
338
|
-
'aria-label': 'content',
|
|
339
334
|
overscan: 10,
|
|
340
335
|
tabIndex: -1,
|
|
341
336
|
height: height + 2,
|
|
@@ -371,8 +366,7 @@ var VirtualizedTree = function VirtualizedTree(props) {
|
|
|
371
366
|
style: style,
|
|
372
367
|
accessibility: accessibility,
|
|
373
368
|
ariaLabel: R.prop('navigateNext')(labels),
|
|
374
|
-
theme: theme
|
|
375
|
-
role: 'presentation'
|
|
369
|
+
theme: theme
|
|
376
370
|
}));
|
|
377
371
|
}
|
|
378
372
|
});
|