@sis-cc/dotstatsuite-visions 12.33.0 → 12.35.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/CollapseButtons/CollapseButtons.js +24 -4
- package/es/CollapseButtons/Item.js +7 -0
- package/es/DynamicDrawer/DynamicDrawer.js +23 -21
- package/es/Logo/Logo.js +1 -1
- package/es/Spotlight/Spotlight.js +0 -1
- package/es/theme.js +9 -9
- package/lib/CollapseButtons/CollapseButtons.js +27 -4
- package/lib/CollapseButtons/Item.js +7 -0
- package/lib/DynamicDrawer/DynamicDrawer.js +23 -21
- package/lib/Logo/Logo.js +1 -1
- package/lib/Spotlight/Spotlight.js +0 -1
- package/lib/theme.js +9 -9
- package/package.json +1 -1
- package/umd/@sis-cc/dotstatsuite-visions.js +2460 -2161
- package/umd/@sis-cc/dotstatsuite-visions.min.js +22 -22
- package/umd/@sis-cc/dotstatsuite-visions.min.js.map +1 -1
|
@@ -2,6 +2,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
|
|
|
2
2
|
|
|
3
3
|
import React, { useState, useEffect } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
|
+
import cx from 'classnames';
|
|
5
6
|
import * as R from 'ramda';
|
|
6
7
|
import makeStyles from '@mui/styles/makeStyles';
|
|
7
8
|
import useMediaQuery from '@mui/material/useMediaQuery';
|
|
@@ -15,15 +16,25 @@ import Paper from './Paper';
|
|
|
15
16
|
export var MAX_COLUMNS = 12;
|
|
16
17
|
export var COLUMNS = [12, 12, 6, 4, 3, 3, 2, 2, 2, 2, 2, 2, 1];
|
|
17
18
|
|
|
18
|
-
var useStyles = makeStyles(function () {
|
|
19
|
+
var useStyles = makeStyles(function (theme) {
|
|
19
20
|
return {
|
|
20
21
|
collapseContainer: {
|
|
21
22
|
width: '100%'
|
|
23
|
+
},
|
|
24
|
+
container: {
|
|
25
|
+
'&:focus': {
|
|
26
|
+
outlineColor: theme.palette.highlight.hl1,
|
|
27
|
+
outlineWidth: 2,
|
|
28
|
+
outlineStyle: 'auto',
|
|
29
|
+
paddingBottom: 16
|
|
30
|
+
}
|
|
22
31
|
}
|
|
23
32
|
};
|
|
24
33
|
});
|
|
25
34
|
|
|
26
35
|
var CollapseButtons = function CollapseButtons(props) {
|
|
36
|
+
var _cx;
|
|
37
|
+
|
|
27
38
|
var _props$items = props.items,
|
|
28
39
|
items = _props$items === undefined ? [] : _props$items,
|
|
29
40
|
_props$action = props.action,
|
|
@@ -43,7 +54,8 @@ var CollapseButtons = function CollapseButtons(props) {
|
|
|
43
54
|
_props$textTransform = props.textTransform,
|
|
44
55
|
textTransform = _props$textTransform === undefined ? 'none' : _props$textTransform,
|
|
45
56
|
_props$labelAccessor = props.labelAccessor,
|
|
46
|
-
labelAccessor = _props$labelAccessor === undefined ? R.prop('label') : _props$labelAccessor
|
|
57
|
+
labelAccessor = _props$labelAccessor === undefined ? R.prop('label') : _props$labelAccessor,
|
|
58
|
+
accessibility = props.accessibility;
|
|
47
59
|
|
|
48
60
|
|
|
49
61
|
var classes = useStyles();
|
|
@@ -76,7 +88,14 @@ var CollapseButtons = function CollapseButtons(props) {
|
|
|
76
88
|
|
|
77
89
|
return React.createElement(
|
|
78
90
|
Grid,
|
|
79
|
-
{
|
|
91
|
+
{
|
|
92
|
+
container: true,
|
|
93
|
+
spacing: 2,
|
|
94
|
+
'data-testid': testId,
|
|
95
|
+
justifyContent: justify,
|
|
96
|
+
className: cx((_cx = {}, _cx[classes.container] = accessibility, _cx)),
|
|
97
|
+
tabIndex: 0
|
|
98
|
+
},
|
|
80
99
|
R.map(function (_ref) {
|
|
81
100
|
var id = _ref.id,
|
|
82
101
|
label = _ref.label,
|
|
@@ -164,7 +183,8 @@ CollapseButtons.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
164
183
|
gridButtonsProps: PropTypes.object,
|
|
165
184
|
justify: PropTypes.string,
|
|
166
185
|
textTransform: PropTypes.string,
|
|
167
|
-
labelAccessor: PropTypes.func
|
|
186
|
+
labelAccessor: PropTypes.func,
|
|
187
|
+
accessibility: PropTypes.bool
|
|
168
188
|
} : {};
|
|
169
189
|
|
|
170
190
|
export default CollapseButtons;
|
|
@@ -106,6 +106,13 @@ var Item = function Item(_ref) {
|
|
|
106
106
|
action(parentId, id);
|
|
107
107
|
e.stopPropagation();
|
|
108
108
|
},
|
|
109
|
+
onKeyDown: function onKeyDown(e) {
|
|
110
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
111
|
+
if (R.not(R.is(Function)(action))) return;
|
|
112
|
+
action(parentId, id);
|
|
113
|
+
e.stopPropagation();
|
|
114
|
+
}
|
|
115
|
+
},
|
|
109
116
|
tabIndex: 0,
|
|
110
117
|
underline: 'none',
|
|
111
118
|
style: { display: 'list-item' }
|
|
@@ -52,7 +52,7 @@ var useStyles = makeStyles(function (theme) {
|
|
|
52
52
|
var getCounter = function getCounter(items, tagAccessor) {
|
|
53
53
|
var selectedItemsIds = R.reduce(function (acc, item) {
|
|
54
54
|
if (R.prop('isSelected', item)) {
|
|
55
|
-
return R.append(
|
|
55
|
+
return R.append(R.prop('id', item), acc);
|
|
56
56
|
}
|
|
57
57
|
return acc;
|
|
58
58
|
}, [], items);
|
|
@@ -84,8 +84,8 @@ var TabPanel = function TabPanel(props) {
|
|
|
84
84
|
_extends({
|
|
85
85
|
role: 'tabpanel',
|
|
86
86
|
hidden: !open,
|
|
87
|
-
id: 'vertical-tabpanel-' +
|
|
88
|
-
'aria-labelledby': 'vertical-tab-' +
|
|
87
|
+
id: 'vertical-tabpanel-' + R.prop('index', item),
|
|
88
|
+
'aria-labelledby': 'vertical-tab-' + R.prop('index', item),
|
|
89
89
|
className: isNarrow ? classes.tabPanelNarrow : classes.tabPanel,
|
|
90
90
|
style: styles
|
|
91
91
|
}, other),
|
|
@@ -178,7 +178,8 @@ var PaperComponent = React.forwardRef(function (_ref, ref) {
|
|
|
178
178
|
tagValueLabel = _ref.tagValueLabel,
|
|
179
179
|
rest = _objectWithoutProperties(_ref, ['label', 'selected', 'item', 'tagAccessor', 'tagValueLabel']);
|
|
180
180
|
|
|
181
|
-
var
|
|
181
|
+
var tag = R.prop('tag', item);
|
|
182
|
+
var Chip = R.isNil(tag) ? InternalTag : tag;
|
|
182
183
|
var classes = useStyles();
|
|
183
184
|
return React.createElement(
|
|
184
185
|
Paper,
|
|
@@ -196,11 +197,11 @@ var PaperComponent = React.forwardRef(function (_ref, ref) {
|
|
|
196
197
|
},
|
|
197
198
|
label
|
|
198
199
|
),
|
|
199
|
-
R.isNil(
|
|
200
|
+
R.isNil(tag) ? React.createElement(
|
|
200
201
|
Chip,
|
|
201
|
-
{ items:
|
|
202
|
-
getCounter(
|
|
203
|
-
) :
|
|
202
|
+
{ items: R.prop('values', item), tagValueLabel: tagValueLabel },
|
|
203
|
+
getCounter(R.prop('values', item), tagAccessor)
|
|
204
|
+
) : tag
|
|
204
205
|
)
|
|
205
206
|
);
|
|
206
207
|
});
|
|
@@ -258,12 +259,13 @@ var DynamicDrawer = function DynamicDrawer(props) {
|
|
|
258
259
|
rest = _objectWithoutProperties(props, ['list', 'labelRenderer', 'onClick', 'handleChangePanel', 'onClosePanel', 'isNarrow', 'labels', 'disableAccessor', 'isApplyHiddenNarrow', 'expandAll', 'collapseAll', 'expandedIds', 'allItems', 'periodPanel', 'classes', 'testId', 'tagAccessor', 'tagAriaLabel', 'children', 'styles']);
|
|
259
260
|
|
|
260
261
|
var handleChange = function handleChange(e, item) {
|
|
261
|
-
var
|
|
262
|
+
var id = R.prop('id', item);
|
|
263
|
+
var filterSelection = R.pipe(R.propOr([], id), function (arr) {
|
|
262
264
|
return R.zipObj(arr, arr);
|
|
263
265
|
})(allSelection);
|
|
264
266
|
setSelection(_extends({}, filterSelection));
|
|
265
|
-
handleChangePanel(
|
|
266
|
-
setSelectedId(
|
|
267
|
+
handleChangePanel(id, selection, allSelection);
|
|
268
|
+
setSelectedId(id);
|
|
267
269
|
setOpen(true);
|
|
268
270
|
};
|
|
269
271
|
var handleSubmit = function handleSubmit() {
|
|
@@ -285,7 +287,7 @@ var DynamicDrawer = function DynamicDrawer(props) {
|
|
|
285
287
|
var filter = useMemo(function () {
|
|
286
288
|
if (!selectedId) return {};
|
|
287
289
|
return R.find(function (item) {
|
|
288
|
-
return
|
|
290
|
+
return R.prop('id', item) === selectedId;
|
|
289
291
|
})(list);
|
|
290
292
|
}, [selectedId, list]);
|
|
291
293
|
|
|
@@ -342,18 +344,18 @@ var DynamicDrawer = function DynamicDrawer(props) {
|
|
|
342
344
|
R.map(function (item) {
|
|
343
345
|
var _cx2;
|
|
344
346
|
|
|
345
|
-
var tagValueLabel = R.isNil(
|
|
347
|
+
var tagValueLabel = R.isNil(R.prop('tag', item)) && getCounter(R.prop('values', item), tagAriaLabel);
|
|
346
348
|
|
|
347
349
|
return React.createElement(Tab, {
|
|
348
|
-
key:
|
|
349
|
-
id:
|
|
350
|
-
'data-testid':
|
|
350
|
+
key: R.prop('id', item),
|
|
351
|
+
id: R.prop('id', filter),
|
|
352
|
+
'data-testid': R.prop('id', item) + '-tab',
|
|
351
353
|
component: React.forwardRef(function TabPaper(tabProps, ref) {
|
|
352
354
|
return React.createElement(PaperComponent, _extends({
|
|
353
355
|
ref: ref
|
|
354
356
|
}, tabProps, {
|
|
355
357
|
label: labelRenderer(item),
|
|
356
|
-
selected: selectedId ===
|
|
358
|
+
selected: selectedId === R.prop('id', item),
|
|
357
359
|
item: item,
|
|
358
360
|
tagAccessor: tagAccessor,
|
|
359
361
|
tagValueLabel: tagValueLabel
|
|
@@ -362,8 +364,8 @@ var DynamicDrawer = function DynamicDrawer(props) {
|
|
|
362
364
|
label: labelRenderer(item),
|
|
363
365
|
'aria-label': labelRenderer(item),
|
|
364
366
|
value: item,
|
|
365
|
-
'aria-selected':
|
|
366
|
-
className: cx(classNames.tab, (_cx2 = {}, _cx2[classNames.tabSelected] =
|
|
367
|
+
'aria-selected': R.prop('id', filter) === R.prop('id', item),
|
|
368
|
+
className: cx(classNames.tab, (_cx2 = {}, _cx2[classNames.tabSelected] = R.prop('id', filter) === R.prop('id', item), _cx2)),
|
|
367
369
|
sx: {
|
|
368
370
|
alignItems: 'start',
|
|
369
371
|
maxWidth: '100%'
|
|
@@ -410,9 +412,9 @@ var DynamicDrawer = function DynamicDrawer(props) {
|
|
|
410
412
|
labelRenderer: labelRenderer,
|
|
411
413
|
styles: styles
|
|
412
414
|
},
|
|
413
|
-
R.equals(
|
|
415
|
+
R.equals(R.prop('id', filter), periodPanel) ? children : React.createElement(AdvancedSelection, _extends({
|
|
414
416
|
id: selectedId,
|
|
415
|
-
items:
|
|
417
|
+
items: R.prop('values', filter) || [],
|
|
416
418
|
isOpen: open,
|
|
417
419
|
labelRenderer: labelRenderer,
|
|
418
420
|
disableAccessor: disableAccessor ? R.pipe(R.prop('isEnabled'), R.not) : undefined,
|
package/es/Logo/Logo.js
CHANGED
|
@@ -31,7 +31,7 @@ var Logo = function Logo(_ref) {
|
|
|
31
31
|
var classes = useStyles();
|
|
32
32
|
return React.createElement(
|
|
33
33
|
'span',
|
|
34
|
-
{ className: classes.container, role: '
|
|
34
|
+
{ className: classes.container, role: 'presentation' },
|
|
35
35
|
React.createElement('img', {
|
|
36
36
|
className: cx(classes.logo, classes.alternativeBrowserLogo),
|
|
37
37
|
style: { maxHeight: maxHeight },
|
|
@@ -102,7 +102,6 @@ var Spotlight = function Spotlight(_ref) {
|
|
|
102
102
|
R.gt(size(R.prop('fields', spotlight)), 1) ? React.createElement(
|
|
103
103
|
Fragment,
|
|
104
104
|
null,
|
|
105
|
-
React.createElement(Divider, { className: classes.divider, 'aria-hidden': 'true' }),
|
|
106
105
|
React.createElement(Field, {
|
|
107
106
|
spotlight: spotlight,
|
|
108
107
|
onChangeField: onChangeField,
|
package/es/theme.js
CHANGED
|
@@ -55,9 +55,9 @@ export var sisccTheme = function sisccTheme(_ref) {
|
|
|
55
55
|
},
|
|
56
56
|
styleOverrides: {
|
|
57
57
|
root: _extends({
|
|
58
|
-
'&:focus': {
|
|
59
|
-
outline: 'none'
|
|
60
|
-
}
|
|
58
|
+
'&:focus': _extends({
|
|
59
|
+
outline: !isA11y && 'none'
|
|
60
|
+
}, isA11y && focus)
|
|
61
61
|
}, buttonBaseFocus)
|
|
62
62
|
}
|
|
63
63
|
},
|
|
@@ -103,9 +103,9 @@ export var sisccTheme = function sisccTheme(_ref) {
|
|
|
103
103
|
styleOverrides: {
|
|
104
104
|
root: {
|
|
105
105
|
textTransform: 'none',
|
|
106
|
-
'&:focus': {
|
|
107
|
-
outline: 'none'
|
|
108
|
-
}
|
|
106
|
+
'&:focus': _extends({
|
|
107
|
+
outline: !isA11y && 'none'
|
|
108
|
+
}, isA11y && focus)
|
|
109
109
|
},
|
|
110
110
|
textPrimary: {
|
|
111
111
|
'&:hover': {
|
|
@@ -142,14 +142,14 @@ export var sisccTheme = function sisccTheme(_ref) {
|
|
|
142
142
|
MuiOutlinedInput: {
|
|
143
143
|
styleOverrides: {
|
|
144
144
|
root: {
|
|
145
|
-
'&.Mui-
|
|
145
|
+
'&.Mui-focusVisible': isA11y && focus
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
},
|
|
149
149
|
MuiTypography: {
|
|
150
150
|
styleOverrides: {
|
|
151
151
|
root: {
|
|
152
|
-
'
|
|
152
|
+
'&:focus': isA11y && focus
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
},
|
|
@@ -164,7 +164,7 @@ export var sisccTheme = function sisccTheme(_ref) {
|
|
|
164
164
|
color: outerPalette.primaryLight || innerPalette.primaryLight,
|
|
165
165
|
textDecoration: 'underline'
|
|
166
166
|
},
|
|
167
|
-
'
|
|
167
|
+
'&:focus': isA11y && focus
|
|
168
168
|
},
|
|
169
169
|
button: {
|
|
170
170
|
'&:focus': isA11y && focus
|
|
@@ -13,6 +13,10 @@ var _propTypes = require('prop-types');
|
|
|
13
13
|
|
|
14
14
|
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
15
15
|
|
|
16
|
+
var _classnames = require('classnames');
|
|
17
|
+
|
|
18
|
+
var _classnames2 = _interopRequireDefault(_classnames);
|
|
19
|
+
|
|
16
20
|
var _ramda = require('ramda');
|
|
17
21
|
|
|
18
22
|
var R = _interopRequireWildcard(_ramda);
|
|
@@ -54,15 +58,25 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
54
58
|
var MAX_COLUMNS = exports.MAX_COLUMNS = 12;
|
|
55
59
|
var COLUMNS = exports.COLUMNS = [12, 12, 6, 4, 3, 3, 2, 2, 2, 2, 2, 2, 1];
|
|
56
60
|
|
|
57
|
-
var useStyles = (0, _makeStyles2.default)(function () {
|
|
61
|
+
var useStyles = (0, _makeStyles2.default)(function (theme) {
|
|
58
62
|
return {
|
|
59
63
|
collapseContainer: {
|
|
60
64
|
width: '100%'
|
|
65
|
+
},
|
|
66
|
+
container: {
|
|
67
|
+
'&:focus': {
|
|
68
|
+
outlineColor: theme.palette.highlight.hl1,
|
|
69
|
+
outlineWidth: 2,
|
|
70
|
+
outlineStyle: 'auto',
|
|
71
|
+
paddingBottom: 16
|
|
72
|
+
}
|
|
61
73
|
}
|
|
62
74
|
};
|
|
63
75
|
});
|
|
64
76
|
|
|
65
77
|
var CollapseButtons = function CollapseButtons(props) {
|
|
78
|
+
var _cx;
|
|
79
|
+
|
|
66
80
|
var _props$items = props.items,
|
|
67
81
|
items = _props$items === undefined ? [] : _props$items,
|
|
68
82
|
_props$action = props.action,
|
|
@@ -82,7 +96,8 @@ var CollapseButtons = function CollapseButtons(props) {
|
|
|
82
96
|
_props$textTransform = props.textTransform,
|
|
83
97
|
textTransform = _props$textTransform === undefined ? 'none' : _props$textTransform,
|
|
84
98
|
_props$labelAccessor = props.labelAccessor,
|
|
85
|
-
labelAccessor = _props$labelAccessor === undefined ? R.prop('label') : _props$labelAccessor
|
|
99
|
+
labelAccessor = _props$labelAccessor === undefined ? R.prop('label') : _props$labelAccessor,
|
|
100
|
+
accessibility = props.accessibility;
|
|
86
101
|
|
|
87
102
|
|
|
88
103
|
var classes = useStyles();
|
|
@@ -115,7 +130,14 @@ var CollapseButtons = function CollapseButtons(props) {
|
|
|
115
130
|
|
|
116
131
|
return _react2.default.createElement(
|
|
117
132
|
_Grid2.default,
|
|
118
|
-
{
|
|
133
|
+
{
|
|
134
|
+
container: true,
|
|
135
|
+
spacing: 2,
|
|
136
|
+
'data-testid': testId,
|
|
137
|
+
justifyContent: justify,
|
|
138
|
+
className: (0, _classnames2.default)((_cx = {}, _cx[classes.container] = accessibility, _cx)),
|
|
139
|
+
tabIndex: 0
|
|
140
|
+
},
|
|
119
141
|
R.map(function (_ref) {
|
|
120
142
|
var id = _ref.id,
|
|
121
143
|
label = _ref.label,
|
|
@@ -203,7 +225,8 @@ CollapseButtons.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
203
225
|
gridButtonsProps: _propTypes2.default.object,
|
|
204
226
|
justify: _propTypes2.default.string,
|
|
205
227
|
textTransform: _propTypes2.default.string,
|
|
206
|
-
labelAccessor: _propTypes2.default.func
|
|
228
|
+
labelAccessor: _propTypes2.default.func,
|
|
229
|
+
accessibility: _propTypes2.default.bool
|
|
207
230
|
} : {};
|
|
208
231
|
|
|
209
232
|
exports.default = CollapseButtons;
|
|
@@ -137,6 +137,13 @@ var Item = function Item(_ref) {
|
|
|
137
137
|
action(parentId, id);
|
|
138
138
|
e.stopPropagation();
|
|
139
139
|
},
|
|
140
|
+
onKeyDown: function onKeyDown(e) {
|
|
141
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
142
|
+
if (R.not(R.is(Function)(action))) return;
|
|
143
|
+
action(parentId, id);
|
|
144
|
+
e.stopPropagation();
|
|
145
|
+
}
|
|
146
|
+
},
|
|
140
147
|
tabIndex: 0,
|
|
141
148
|
underline: 'none',
|
|
142
149
|
style: { display: 'list-item' }
|
|
@@ -102,7 +102,7 @@ var useStyles = (0, _makeStyles2.default)(function (theme) {
|
|
|
102
102
|
var getCounter = function getCounter(items, tagAccessor) {
|
|
103
103
|
var selectedItemsIds = R.reduce(function (acc, item) {
|
|
104
104
|
if (R.prop('isSelected', item)) {
|
|
105
|
-
return R.append(
|
|
105
|
+
return R.append(R.prop('id', item), acc);
|
|
106
106
|
}
|
|
107
107
|
return acc;
|
|
108
108
|
}, [], items);
|
|
@@ -134,8 +134,8 @@ var TabPanel = function TabPanel(props) {
|
|
|
134
134
|
_extends({
|
|
135
135
|
role: 'tabpanel',
|
|
136
136
|
hidden: !open,
|
|
137
|
-
id: 'vertical-tabpanel-' +
|
|
138
|
-
'aria-labelledby': 'vertical-tab-' +
|
|
137
|
+
id: 'vertical-tabpanel-' + R.prop('index', item),
|
|
138
|
+
'aria-labelledby': 'vertical-tab-' + R.prop('index', item),
|
|
139
139
|
className: isNarrow ? classes.tabPanelNarrow : classes.tabPanel,
|
|
140
140
|
style: styles
|
|
141
141
|
}, other),
|
|
@@ -228,7 +228,8 @@ var PaperComponent = _react2.default.forwardRef(function (_ref, ref) {
|
|
|
228
228
|
tagValueLabel = _ref.tagValueLabel,
|
|
229
229
|
rest = _objectWithoutProperties(_ref, ['label', 'selected', 'item', 'tagAccessor', 'tagValueLabel']);
|
|
230
230
|
|
|
231
|
-
var
|
|
231
|
+
var tag = R.prop('tag', item);
|
|
232
|
+
var Chip = R.isNil(tag) ? _.Tag : tag;
|
|
232
233
|
var classes = useStyles();
|
|
233
234
|
return _react2.default.createElement(
|
|
234
235
|
_Paper2.default,
|
|
@@ -246,11 +247,11 @@ var PaperComponent = _react2.default.forwardRef(function (_ref, ref) {
|
|
|
246
247
|
},
|
|
247
248
|
label
|
|
248
249
|
),
|
|
249
|
-
R.isNil(
|
|
250
|
+
R.isNil(tag) ? _react2.default.createElement(
|
|
250
251
|
Chip,
|
|
251
|
-
{ items:
|
|
252
|
-
getCounter(
|
|
253
|
-
) :
|
|
252
|
+
{ items: R.prop('values', item), tagValueLabel: tagValueLabel },
|
|
253
|
+
getCounter(R.prop('values', item), tagAccessor)
|
|
254
|
+
) : tag
|
|
254
255
|
)
|
|
255
256
|
);
|
|
256
257
|
});
|
|
@@ -308,12 +309,13 @@ var DynamicDrawer = function DynamicDrawer(props) {
|
|
|
308
309
|
rest = _objectWithoutProperties(props, ['list', 'labelRenderer', 'onClick', 'handleChangePanel', 'onClosePanel', 'isNarrow', 'labels', 'disableAccessor', 'isApplyHiddenNarrow', 'expandAll', 'collapseAll', 'expandedIds', 'allItems', 'periodPanel', 'classes', 'testId', 'tagAccessor', 'tagAriaLabel', 'children', 'styles']);
|
|
309
310
|
|
|
310
311
|
var handleChange = function handleChange(e, item) {
|
|
311
|
-
var
|
|
312
|
+
var id = R.prop('id', item);
|
|
313
|
+
var filterSelection = R.pipe(R.propOr([], id), function (arr) {
|
|
312
314
|
return R.zipObj(arr, arr);
|
|
313
315
|
})(allSelection);
|
|
314
316
|
setSelection(_extends({}, filterSelection));
|
|
315
|
-
handleChangePanel(
|
|
316
|
-
setSelectedId(
|
|
317
|
+
handleChangePanel(id, selection, allSelection);
|
|
318
|
+
setSelectedId(id);
|
|
317
319
|
setOpen(true);
|
|
318
320
|
};
|
|
319
321
|
var handleSubmit = function handleSubmit() {
|
|
@@ -335,7 +337,7 @@ var DynamicDrawer = function DynamicDrawer(props) {
|
|
|
335
337
|
var filter = (0, _react.useMemo)(function () {
|
|
336
338
|
if (!selectedId) return {};
|
|
337
339
|
return R.find(function (item) {
|
|
338
|
-
return
|
|
340
|
+
return R.prop('id', item) === selectedId;
|
|
339
341
|
})(list);
|
|
340
342
|
}, [selectedId, list]);
|
|
341
343
|
|
|
@@ -392,18 +394,18 @@ var DynamicDrawer = function DynamicDrawer(props) {
|
|
|
392
394
|
R.map(function (item) {
|
|
393
395
|
var _cx2;
|
|
394
396
|
|
|
395
|
-
var tagValueLabel = R.isNil(
|
|
397
|
+
var tagValueLabel = R.isNil(R.prop('tag', item)) && getCounter(R.prop('values', item), tagAriaLabel);
|
|
396
398
|
|
|
397
399
|
return _react2.default.createElement(_Tab2.default, {
|
|
398
|
-
key:
|
|
399
|
-
id:
|
|
400
|
-
'data-testid':
|
|
400
|
+
key: R.prop('id', item),
|
|
401
|
+
id: R.prop('id', filter),
|
|
402
|
+
'data-testid': R.prop('id', item) + '-tab',
|
|
401
403
|
component: _react2.default.forwardRef(function TabPaper(tabProps, ref) {
|
|
402
404
|
return _react2.default.createElement(PaperComponent, _extends({
|
|
403
405
|
ref: ref
|
|
404
406
|
}, tabProps, {
|
|
405
407
|
label: labelRenderer(item),
|
|
406
|
-
selected: selectedId ===
|
|
408
|
+
selected: selectedId === R.prop('id', item),
|
|
407
409
|
item: item,
|
|
408
410
|
tagAccessor: tagAccessor,
|
|
409
411
|
tagValueLabel: tagValueLabel
|
|
@@ -412,8 +414,8 @@ var DynamicDrawer = function DynamicDrawer(props) {
|
|
|
412
414
|
label: labelRenderer(item),
|
|
413
415
|
'aria-label': labelRenderer(item),
|
|
414
416
|
value: item,
|
|
415
|
-
'aria-selected':
|
|
416
|
-
className: (0, _classnames2.default)(classNames.tab, (_cx2 = {}, _cx2[classNames.tabSelected] =
|
|
417
|
+
'aria-selected': R.prop('id', filter) === R.prop('id', item),
|
|
418
|
+
className: (0, _classnames2.default)(classNames.tab, (_cx2 = {}, _cx2[classNames.tabSelected] = R.prop('id', filter) === R.prop('id', item), _cx2)),
|
|
417
419
|
sx: {
|
|
418
420
|
alignItems: 'start',
|
|
419
421
|
maxWidth: '100%'
|
|
@@ -460,9 +462,9 @@ var DynamicDrawer = function DynamicDrawer(props) {
|
|
|
460
462
|
labelRenderer: labelRenderer,
|
|
461
463
|
styles: styles
|
|
462
464
|
},
|
|
463
|
-
R.equals(
|
|
465
|
+
R.equals(R.prop('id', filter), periodPanel) ? children : _react2.default.createElement(_AdvancedSelection2.default, _extends({
|
|
464
466
|
id: selectedId,
|
|
465
|
-
items:
|
|
467
|
+
items: R.prop('values', filter) || [],
|
|
466
468
|
isOpen: open,
|
|
467
469
|
labelRenderer: labelRenderer,
|
|
468
470
|
disableAccessor: disableAccessor ? R.pipe(R.prop('isEnabled'), R.not) : undefined,
|
package/lib/Logo/Logo.js
CHANGED
|
@@ -48,7 +48,7 @@ var Logo = function Logo(_ref) {
|
|
|
48
48
|
var classes = useStyles();
|
|
49
49
|
return _react2.default.createElement(
|
|
50
50
|
'span',
|
|
51
|
-
{ className: classes.container, role: '
|
|
51
|
+
{ className: classes.container, role: 'presentation' },
|
|
52
52
|
_react2.default.createElement('img', {
|
|
53
53
|
className: (0, _classnames2.default)(classes.logo, classes.alternativeBrowserLogo),
|
|
54
54
|
style: { maxHeight: maxHeight },
|
|
@@ -149,7 +149,6 @@ var Spotlight = function Spotlight(_ref) {
|
|
|
149
149
|
R.gt(size(R.prop('fields', spotlight)), 1) ? _react2.default.createElement(
|
|
150
150
|
_react.Fragment,
|
|
151
151
|
null,
|
|
152
|
-
_react2.default.createElement(_Divider2.default, { className: classes.divider, 'aria-hidden': 'true' }),
|
|
153
152
|
_react2.default.createElement(_Fields.Field, {
|
|
154
153
|
spotlight: spotlight,
|
|
155
154
|
onChangeField: onChangeField,
|
package/lib/theme.js
CHANGED
|
@@ -59,9 +59,9 @@ var sisccTheme = exports.sisccTheme = function sisccTheme(_ref) {
|
|
|
59
59
|
},
|
|
60
60
|
styleOverrides: {
|
|
61
61
|
root: _extends({
|
|
62
|
-
'&:focus': {
|
|
63
|
-
outline: 'none'
|
|
64
|
-
}
|
|
62
|
+
'&:focus': _extends({
|
|
63
|
+
outline: !isA11y && 'none'
|
|
64
|
+
}, isA11y && focus)
|
|
65
65
|
}, buttonBaseFocus)
|
|
66
66
|
}
|
|
67
67
|
},
|
|
@@ -107,9 +107,9 @@ var sisccTheme = exports.sisccTheme = function sisccTheme(_ref) {
|
|
|
107
107
|
styleOverrides: {
|
|
108
108
|
root: {
|
|
109
109
|
textTransform: 'none',
|
|
110
|
-
'&:focus': {
|
|
111
|
-
outline: 'none'
|
|
112
|
-
}
|
|
110
|
+
'&:focus': _extends({
|
|
111
|
+
outline: !isA11y && 'none'
|
|
112
|
+
}, isA11y && focus)
|
|
113
113
|
},
|
|
114
114
|
textPrimary: {
|
|
115
115
|
'&:hover': {
|
|
@@ -146,14 +146,14 @@ var sisccTheme = exports.sisccTheme = function sisccTheme(_ref) {
|
|
|
146
146
|
MuiOutlinedInput: {
|
|
147
147
|
styleOverrides: {
|
|
148
148
|
root: {
|
|
149
|
-
'&.Mui-
|
|
149
|
+
'&.Mui-focusVisible': isA11y && focus
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
},
|
|
153
153
|
MuiTypography: {
|
|
154
154
|
styleOverrides: {
|
|
155
155
|
root: {
|
|
156
|
-
'
|
|
156
|
+
'&:focus': isA11y && focus
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
},
|
|
@@ -168,7 +168,7 @@ var sisccTheme = exports.sisccTheme = function sisccTheme(_ref) {
|
|
|
168
168
|
color: outerPalette.primaryLight || innerPalette.primaryLight,
|
|
169
169
|
textDecoration: 'underline'
|
|
170
170
|
},
|
|
171
|
-
'
|
|
171
|
+
'&:focus': isA11y && focus
|
|
172
172
|
},
|
|
173
173
|
button: {
|
|
174
174
|
'&:focus': isA11y && focus
|