@sis-cc/dotstatsuite-visions 7.17.11 → 7.17.13

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/Chips.js CHANGED
@@ -21,6 +21,10 @@ var myTooltipRenderer = function myTooltipRenderer(_ref) {
21
21
 
22
22
  export var useStyles = makeStyles(function (theme) {
23
23
  return {
24
+ root: {
25
+ display: 'flex',
26
+ flexWrap: 'wrap'
27
+ },
24
28
  chip: {
25
29
  height: 'unset',
26
30
  borderRadius: 3,
@@ -54,6 +58,11 @@ export var useStyles = makeStyles(function (theme) {
54
58
  margin: theme.spacing(0.5),
55
59
  backgroundColor: theme.palette.grey[700]
56
60
  },
61
+ dividerHz: {
62
+ width: '100%',
63
+ margin: theme.spacing(0.5),
64
+ backgroundColor: theme.palette.grey[700]
65
+ },
57
66
  spaceLabel: {
58
67
  paddingLeft: 0
59
68
  },
@@ -173,16 +182,20 @@ var Chips = function Chips(_ref3) {
173
182
  ariaLabel = _ref3.ariaLabel,
174
183
  _ref3$reducingNbChips = _ref3.reducingNbChips,
175
184
  reducingNbChips = _ref3$reducingNbChips === undefined ? 15 : _ref3$reducingNbChips,
176
- labels = _ref3.labels;
185
+ labels = _ref3.labels,
186
+ _ref3$isVis = _ref3.isVis,
187
+ isVis = _ref3$isVis === undefined ? false : _ref3$isVis;
177
188
 
178
189
  var classes = useStyles();
179
190
  var theme = useTheme();
180
191
  var isRtl = getIsRtl(theme);
181
192
 
182
193
  return React.createElement(
183
- 'div',
184
- { 'data-testid': 'chips-test-id' },
194
+ Grid,
195
+ { container: isVis, 'data-testid': 'chips-test-id' },
185
196
  R.map(function (itemProps) {
197
+ var _cx2;
198
+
186
199
  var parentId = itemProps.id,
187
200
  isNotRemovable = itemProps.isNotRemovable,
188
201
  _itemProps$values = itemProps.values,
@@ -190,10 +203,15 @@ var Chips = function Chips(_ref3) {
190
203
 
191
204
  return React.createElement(
192
205
  Grid,
193
- { container: true, className: classes.root, key: parentId },
206
+ {
207
+ item: isVis,
208
+ container: !isVis,
209
+ key: parentId,
210
+ className: cx((_cx2 = {}, _cx2[classes.root] = isVis, _cx2))
211
+ },
194
212
  React.createElement(
195
213
  Grid,
196
- { item: true, xs: 12 },
214
+ { item: !isVis, style: !isVis ? { width: '100%' } : null },
197
215
  React.createElement(CustomChip, {
198
216
  parentId: parentId,
199
217
  label: labelRenderer(itemProps) + ':',
@@ -230,13 +248,14 @@ var Chips = function Chips(_ref3) {
230
248
  labelClasses: cx(classes.formatLabel)
231
249
  });
232
250
  })(values),
233
- React.createElement(Divider, { className: classes.divider })
234
- )
251
+ !isVis && React.createElement(Divider, { className: classes.dividerHz })
252
+ ),
253
+ isVis && React.createElement(Divider, { className: classes.divider, orientation: 'vertical', flexItem: true })
235
254
  );
236
255
  })(items),
237
256
  R.is(Function)(onDeleteAll) && React.createElement(
238
257
  Grid,
239
- { container: true, className: classes.root },
258
+ { container: true },
240
259
  React.createElement(
241
260
  Grid,
242
261
  { item: true, xs: 12 },
@@ -273,7 +292,8 @@ Chips.propTypes = process.env.NODE_ENV !== "production" ? {
273
292
  reducingNbChips: PropTypes.number,
274
293
  labels: PropTypes.shape({
275
294
  reducingChip: PropTypes.oneOfType([PropTypes.string, PropTypes.element])
276
- })
295
+ }),
296
+ isVis: PropTypes.bool
277
297
  } : {};
278
298
 
279
299
  export default withBlank(function (_ref4) {
package/es/Chips/index.js CHANGED
@@ -30,6 +30,7 @@
30
30
  * labels: PropTypes.shape({
31
31
  * reducingChip: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
32
32
  * }),
33
+ * isVis: PropTypes.bool,
33
34
  * };
34
35
  * @theme
35
36
  * {
@@ -19,7 +19,8 @@ var CustomExpansionPanel = function CustomExpansionPanel(_ref) {
19
19
  onChangeActivePanel = _ref.onChangeActivePanel,
20
20
  label = _ref.label,
21
21
  tag = _ref.tag,
22
- overflow = _ref.overflow,
22
+ _ref$overflow = _ref.overflow,
23
+ overflow = _ref$overflow === undefined ? true : _ref$overflow,
23
24
  children = _ref.children,
24
25
  isOpen = _ref.isOpen,
25
26
  _ref$maxHeight = _ref.maxHeight,
@@ -28,7 +29,8 @@ var CustomExpansionPanel = function CustomExpansionPanel(_ref) {
28
29
  _ref$testId = _ref.testId,
29
30
  testId = _ref$testId === undefined ? 'expansion_panel' : _ref$testId,
30
31
  isPinned = _ref.isPinned,
31
- pinnedLabel = _ref.pinnedLabel;
32
+ pinnedLabel = _ref.pinnedLabel,
33
+ moreFilters = _ref.moreFilters;
32
34
 
33
35
  var classes = useStyles();
34
36
 
@@ -68,7 +70,12 @@ var CustomExpansionPanel = function CustomExpansionPanel(_ref) {
68
70
  ),
69
71
  React.createElement(
70
72
  Typography,
71
- { noWrap: true, variant: 'body2', title: label, className: classes.label },
73
+ {
74
+ noWrap: true,
75
+ variant: 'body2',
76
+ title: label,
77
+ className: moreFilters ? classes.title : classes.label
78
+ },
72
79
  label
73
80
  ),
74
81
  isPinned && React.createElement(
@@ -104,7 +111,8 @@ CustomExpansionPanel.propTypes = process.env.NODE_ENV !== "production" ? {
104
111
  maxHeight: PropTypes.bool,
105
112
  children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
106
113
  fullWidth: PropTypes.bool,
107
- isPinned: PropTypes.bool
114
+ isPinned: PropTypes.bool,
115
+ moreFilters: PropTypes.bool
108
116
  } : {};
109
117
 
110
118
  export default withBlank(function (_ref2) {
@@ -23,6 +23,7 @@
23
23
  * ]),
24
24
  * fullWidth: PropTypes.bool,
25
25
  * isPinned: PropTypes.bool,
26
+ * moreFilters: PropTypes.bool,
26
27
  * };
27
28
  * @theme
28
29
  * {
@@ -65,6 +65,11 @@ export var useStyles = makeStyles(function (theme) {
65
65
  },
66
66
  label: _extends({
67
67
  color: theme.palette.grey[700]
68
- }, R.pathOr({}, ['mixins', 'expansionPanel', 'title'], theme))
68
+ }, R.pathOr({}, ['mixins', 'expansionPanel', 'title'], theme)),
69
+ title: _extends({
70
+ padding: 0
71
+ }, R.pathOr({}, ['mixins', 'apiQueries', 'title'], theme), {
72
+ fontWeight: 'bold'
73
+ })
69
74
  };
70
75
  });
@@ -61,6 +61,10 @@ var myTooltipRenderer = function myTooltipRenderer(_ref) {
61
61
 
62
62
  var useStyles = exports.useStyles = (0, _styles.makeStyles)(function (theme) {
63
63
  return {
64
+ root: {
65
+ display: 'flex',
66
+ flexWrap: 'wrap'
67
+ },
64
68
  chip: {
65
69
  height: 'unset',
66
70
  borderRadius: 3,
@@ -94,6 +98,11 @@ var useStyles = exports.useStyles = (0, _styles.makeStyles)(function (theme) {
94
98
  margin: theme.spacing(0.5),
95
99
  backgroundColor: theme.palette.grey[700]
96
100
  },
101
+ dividerHz: {
102
+ width: '100%',
103
+ margin: theme.spacing(0.5),
104
+ backgroundColor: theme.palette.grey[700]
105
+ },
97
106
  spaceLabel: {
98
107
  paddingLeft: 0
99
108
  },
@@ -213,16 +222,20 @@ var Chips = function Chips(_ref3) {
213
222
  ariaLabel = _ref3.ariaLabel,
214
223
  _ref3$reducingNbChips = _ref3.reducingNbChips,
215
224
  reducingNbChips = _ref3$reducingNbChips === undefined ? 15 : _ref3$reducingNbChips,
216
- labels = _ref3.labels;
225
+ labels = _ref3.labels,
226
+ _ref3$isVis = _ref3.isVis,
227
+ isVis = _ref3$isVis === undefined ? false : _ref3$isVis;
217
228
 
218
229
  var classes = useStyles();
219
230
  var theme = (0, _styles.useTheme)();
220
231
  var isRtl = (0, _utils.getIsRtl)(theme);
221
232
 
222
233
  return _react2.default.createElement(
223
- 'div',
224
- { 'data-testid': 'chips-test-id' },
234
+ _Grid2.default,
235
+ { container: isVis, 'data-testid': 'chips-test-id' },
225
236
  R.map(function (itemProps) {
237
+ var _cx2;
238
+
226
239
  var parentId = itemProps.id,
227
240
  isNotRemovable = itemProps.isNotRemovable,
228
241
  _itemProps$values = itemProps.values,
@@ -230,10 +243,15 @@ var Chips = function Chips(_ref3) {
230
243
 
231
244
  return _react2.default.createElement(
232
245
  _Grid2.default,
233
- { container: true, className: classes.root, key: parentId },
246
+ {
247
+ item: isVis,
248
+ container: !isVis,
249
+ key: parentId,
250
+ className: (0, _classnames2.default)((_cx2 = {}, _cx2[classes.root] = isVis, _cx2))
251
+ },
234
252
  _react2.default.createElement(
235
253
  _Grid2.default,
236
- { item: true, xs: 12 },
254
+ { item: !isVis, style: !isVis ? { width: '100%' } : null },
237
255
  _react2.default.createElement(CustomChip, {
238
256
  parentId: parentId,
239
257
  label: labelRenderer(itemProps) + ':',
@@ -270,13 +288,14 @@ var Chips = function Chips(_ref3) {
270
288
  labelClasses: (0, _classnames2.default)(classes.formatLabel)
271
289
  });
272
290
  })(values),
273
- _react2.default.createElement(_Divider2.default, { className: classes.divider })
274
- )
291
+ !isVis && _react2.default.createElement(_Divider2.default, { className: classes.dividerHz })
292
+ ),
293
+ isVis && _react2.default.createElement(_Divider2.default, { className: classes.divider, orientation: 'vertical', flexItem: true })
275
294
  );
276
295
  })(items),
277
296
  R.is(Function)(onDeleteAll) && _react2.default.createElement(
278
297
  _Grid2.default,
279
- { container: true, className: classes.root },
298
+ { container: true },
280
299
  _react2.default.createElement(
281
300
  _Grid2.default,
282
301
  { item: true, xs: 12 },
@@ -313,7 +332,8 @@ Chips.propTypes = process.env.NODE_ENV !== "production" ? {
313
332
  reducingNbChips: _propTypes2.default.number,
314
333
  labels: _propTypes2.default.shape({
315
334
  reducingChip: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.element])
316
- })
335
+ }),
336
+ isVis: _propTypes2.default.bool
317
337
  } : {};
318
338
 
319
339
  exports.default = (0, _utils.withBlank)(function (_ref4) {
@@ -58,7 +58,8 @@ var CustomExpansionPanel = function CustomExpansionPanel(_ref) {
58
58
  onChangeActivePanel = _ref.onChangeActivePanel,
59
59
  label = _ref.label,
60
60
  tag = _ref.tag,
61
- overflow = _ref.overflow,
61
+ _ref$overflow = _ref.overflow,
62
+ overflow = _ref$overflow === undefined ? true : _ref$overflow,
62
63
  children = _ref.children,
63
64
  isOpen = _ref.isOpen,
64
65
  _ref$maxHeight = _ref.maxHeight,
@@ -67,7 +68,8 @@ var CustomExpansionPanel = function CustomExpansionPanel(_ref) {
67
68
  _ref$testId = _ref.testId,
68
69
  testId = _ref$testId === undefined ? 'expansion_panel' : _ref$testId,
69
70
  isPinned = _ref.isPinned,
70
- pinnedLabel = _ref.pinnedLabel;
71
+ pinnedLabel = _ref.pinnedLabel,
72
+ moreFilters = _ref.moreFilters;
71
73
 
72
74
  var classes = (0, _styles.useStyles)();
73
75
 
@@ -107,7 +109,12 @@ var CustomExpansionPanel = function CustomExpansionPanel(_ref) {
107
109
  ),
108
110
  _react2.default.createElement(
109
111
  _Typography2.default,
110
- { noWrap: true, variant: 'body2', title: label, className: classes.label },
112
+ {
113
+ noWrap: true,
114
+ variant: 'body2',
115
+ title: label,
116
+ className: moreFilters ? classes.title : classes.label
117
+ },
111
118
  label
112
119
  ),
113
120
  isPinned && _react2.default.createElement(
@@ -143,7 +150,8 @@ CustomExpansionPanel.propTypes = process.env.NODE_ENV !== "production" ? {
143
150
  maxHeight: _propTypes2.default.bool,
144
151
  children: _propTypes2.default.oneOfType([_propTypes2.default.arrayOf(_propTypes2.default.node), _propTypes2.default.node]),
145
152
  fullWidth: _propTypes2.default.bool,
146
- isPinned: _propTypes2.default.bool
153
+ isPinned: _propTypes2.default.bool,
154
+ moreFilters: _propTypes2.default.bool
147
155
  } : {};
148
156
 
149
157
  exports.default = (0, _utils.withBlank)(function (_ref2) {
@@ -75,6 +75,11 @@ var useStyles = exports.useStyles = (0, _styles.makeStyles)(function (theme) {
75
75
  },
76
76
  label: _extends({
77
77
  color: theme.palette.grey[700]
78
- }, R.pathOr({}, ['mixins', 'expansionPanel', 'title'], theme))
78
+ }, R.pathOr({}, ['mixins', 'expansionPanel', 'title'], theme)),
79
+ title: _extends({
80
+ padding: 0
81
+ }, R.pathOr({}, ['mixins', 'apiQueries', 'title'], theme), {
82
+ fontWeight: 'bold'
83
+ })
79
84
  };
80
85
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sis-cc/dotstatsuite-visions",
3
- "version": "7.17.11",
3
+ "version": "7.17.13",
4
4
  "description": "Library of visual components",
5
5
  "author": "OECD",
6
6
  "homepage": "https://visions-qa.siscc.org/#o",