@sis-cc/dotstatsuite-visions 7.17.13 → 7.18.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.
Files changed (40) hide show
  1. package/es/ChartsConfig/ChartsConfig.js +368 -116
  2. package/es/ChartsConfig/Input.js +1 -0
  3. package/es/ChartsConfig/InputProxy.js +54 -0
  4. package/es/ChartsConfig/Proxy.js +20 -0
  5. package/es/ChartsConfig/Title.js +38 -0
  6. package/es/ChartsConfig/index.js +1 -1
  7. package/es/ChartsConfig/useAxisOptions.js +9 -0
  8. package/es/ChartsConfig/useDimensionOptions.js +12 -0
  9. package/es/ChartsConfig/useFocusOptions.js +22 -0
  10. package/es/ChartsConfig/utils.js +3 -9
  11. package/es/DataEdit/DataEdit.js +50 -75
  12. package/es/Select/Select.js +11 -4
  13. package/lib/ChartsConfig/ChartsConfig.js +380 -128
  14. package/lib/ChartsConfig/Input.js +1 -0
  15. package/lib/ChartsConfig/InputProxy.js +75 -0
  16. package/lib/ChartsConfig/Proxy.js +34 -0
  17. package/lib/ChartsConfig/Title.js +57 -0
  18. package/lib/ChartsConfig/useAxisOptions.js +18 -0
  19. package/lib/ChartsConfig/useDimensionOptions.js +22 -0
  20. package/lib/ChartsConfig/useFocusOptions.js +32 -0
  21. package/lib/ChartsConfig/utils.js +4 -10
  22. package/lib/DataEdit/DataEdit.js +50 -79
  23. package/lib/Select/Select.js +12 -4
  24. package/package.json +1 -1
  25. package/es/ChartsConfig/Axis.js +0 -96
  26. package/es/ChartsConfig/ButtonGroup.js +0 -66
  27. package/es/ChartsConfig/ContainerTitle.js +0 -55
  28. package/es/ChartsConfig/Focus.js +0 -69
  29. package/es/ChartsConfig/Frequency.js +0 -51
  30. package/es/ChartsConfig/Series.js +0 -66
  31. package/es/ChartsConfig/Size.js +0 -67
  32. package/es/ChartsConfig/styles.js +0 -52
  33. package/lib/ChartsConfig/Axis.js +0 -128
  34. package/lib/ChartsConfig/ButtonGroup.js +0 -92
  35. package/lib/ChartsConfig/ContainerTitle.js +0 -82
  36. package/lib/ChartsConfig/Focus.js +0 -97
  37. package/lib/ChartsConfig/Frequency.js +0 -78
  38. package/lib/ChartsConfig/Series.js +0 -97
  39. package/lib/ChartsConfig/Size.js +0 -98
  40. package/lib/ChartsConfig/styles.js +0 -62
@@ -1,136 +1,395 @@
1
1
  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
2
2
 
3
- import React, { Fragment } from 'react';
3
+ import React from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import * as R from 'ramda';
6
6
  import Grid from '@material-ui/core/Grid';
7
- import Divider from '@material-ui/core/Divider';
8
7
  import ArrowForwardIcon from '@material-ui/icons/ArrowForward';
9
8
  import ArrowUpwardIcon from '@material-ui/icons/ArrowUpward';
10
- import ButtonGroup from './ButtonGroup';
11
- import FocusConfig from './Focus';
12
- import SizeConfig from './Size';
13
- import SeriesConfig from './Series';
14
- import FrequencyConfig from './Frequency';
15
- import AxisConfig from './Axis';
9
+ import Title from './Title';
10
+ import { Button, InputAdornment, Typography } from '@material-ui/core';
11
+ import useFocusOptions from './useFocusOptions';
12
+ import Select from '../Select';
13
+ import { extractMultipleValue, getValue } from './utils';
14
+ import useDimensionOptions from './useDimensionOptions';
15
+ import InputProxy from './InputProxy';
16
+ import Proxy from './Proxy';
17
+ import useAxisOptions from './useAxisOptions';
18
+ import { makeStyles } from '@material-ui/core/styles';
16
19
  import DataEdit from '../DataEdit';
17
- import { isActivePanel, seriesProperties, isActive } from './utils';
18
- import { useStyles } from './styles';
19
- import { withBlank } from '../utils';
20
20
 
21
- var ChartsConfig = function ChartsConfig(_ref) {
22
- var labels = _ref.labels,
23
- properties = _ref.properties;
21
+ export var useStyles = makeStyles(function (theme) {
22
+ return {
23
+ greyVariant: {
24
+ backgroundColor: theme.palette.secondary.dark,
25
+ color: theme.palette.grey[600]
26
+ }
27
+ };
28
+ });
29
+
30
+ var ChartConfig = function ChartConfig(_ref) {
31
+ var _ref$labels = _ref.labels,
32
+ labels = _ref$labels === undefined ? {} : _ref$labels,
33
+ _ref$properties = _ref.properties,
34
+ properties = _ref$properties === undefined ? {} : _ref$properties;
24
35
 
25
36
  var classes = useStyles();
37
+
38
+ var _useDimensionOptions = useDimensionOptions(properties),
39
+ dimensions = _useDimensionOptions[0];
40
+
41
+ var xKeys = useAxisOptions(properties, 'X');
42
+ var yKeys = useAxisOptions(properties, 'Y');
43
+
44
+ var highlight = properties.highlight,
45
+ baseline = properties.baseline;
46
+
47
+ var _useFocusOptions = useFocusOptions(highlight, labels),
48
+ highlightOptions = _useFocusOptions[0],
49
+ xhighlightOptions = _useFocusOptions[1];
50
+
51
+ var _useFocusOptions2 = useFocusOptions(baseline, labels),
52
+ baselineOptions = _useFocusOptions2[0],
53
+ xbaselineOptions = _useFocusOptions2[1];
54
+
55
+ var _properties$stackedMo = properties.stackedMode,
56
+ stackedMode = _properties$stackedMo === undefined ? {} : _properties$stackedMo;
57
+ var _stackedMode$options = stackedMode.options,
58
+ stackedModeOptions = _stackedMode$options === undefined ? [] : _stackedMode$options;
59
+ var _properties$displayMo = properties.displayMode,
60
+ displayMode = _properties$displayMo === undefined ? {} : _properties$displayMo;
61
+ var _displayMode$options = displayMode.options,
62
+ displayModeOptions = _displayMode$options === undefined ? [] : _displayMode$options;
63
+
64
+
65
+ var dKeys = ['dimensions', 'stackedDimension', 'scatterDimension', 'symbolDimension'];
66
+ var eKeys = ['title', 'subtitle', 'source', 'logo', 'copyright'];
67
+
68
+ if (R.isEmpty(properties)) return null;
69
+
26
70
  return React.createElement(
27
71
  Grid,
28
- { 'data-testid': 'charts-config-test-id', spacing: 2, container: true, className: classes.root },
29
- isActivePanel(seriesProperties, properties) && React.createElement(
30
- Grid,
31
- {
32
- item: true,
33
- xs: 12,
34
- sm: 12,
35
- md: 12,
36
- lg: isActivePanel(['highlight', 'baseline', 'width', 'height'], properties) ? 6 : 12
37
- },
38
- React.createElement(SeriesConfig, { labels: labels, properties: R.pick(seriesProperties, properties) })
39
- ),
40
- isActivePanel(['highlight', 'baseline', 'width', 'height'], properties) && React.createElement(
41
- Grid,
42
- {
43
- item: true,
44
- xs: 12,
45
- sm: 12,
46
- md: 12,
47
- lg: isActivePanel(seriesProperties, properties) ? 6 : 12
48
- },
72
+ { container: true, spacing: 3, 'data-testid': 'charts-config-test-id' },
73
+ React.createElement(
74
+ Proxy,
75
+ { keys: dKeys, properties: properties },
49
76
  React.createElement(
50
77
  Grid,
51
- { container: true, spacing: 2 },
52
- isActivePanel(['highlight', 'baseline'], properties) && React.createElement(FocusConfig, {
53
- baseline: R.prop('baseline', properties),
54
- highlight: R.prop('highlight', properties),
55
- labels: labels
56
- }),
57
- isActivePanel(['width', 'height'], properties) && React.createElement(SizeConfig, {
58
- height: R.prop('height', properties),
59
- labels: labels,
60
- width: R.prop('width', properties)
61
- })
78
+ { item: true, xs: 12, container: true, spacing: 2 },
79
+ React.createElement(
80
+ Grid,
81
+ { item: true, xs: 12, container: true },
82
+ React.createElement(
83
+ Grid,
84
+ { item: true, xs: 12 },
85
+ React.createElement(Title, { label: labels.series })
86
+ ),
87
+ React.createElement(
88
+ Grid,
89
+ { item: true, xs: 12 },
90
+ React.createElement(
91
+ Grid,
92
+ { container: true, spacing: 1 },
93
+ React.createElement(
94
+ Proxy,
95
+ { keys: ['stackedMode'], properties: properties },
96
+ React.createElement(
97
+ Grid,
98
+ { item: true, container: true, spacing: 1, alignItems: 'center', style: { minWidth: 320 } },
99
+ React.createElement(
100
+ Grid,
101
+ { item: true, xs: true },
102
+ React.createElement(
103
+ Typography,
104
+ { variant: 'body2' },
105
+ labels.stackedMode
106
+ )
107
+ ),
108
+ R.map(function (option) {
109
+ return React.createElement(
110
+ Grid,
111
+ { item: true, key: option.value },
112
+ React.createElement(
113
+ Button,
114
+ {
115
+ variant: option.value === stackedMode.value ? 'contained' : 'outlined',
116
+ onClick: function onClick() {
117
+ return stackedMode.onChange(option.value);
118
+ },
119
+ color: 'primary'
120
+ },
121
+ React.createElement(
122
+ Typography,
123
+ { variant: 'body2' },
124
+ R.path(['stackedModeOptions', option.value], labels)
125
+ )
126
+ )
127
+ );
128
+ }, stackedModeOptions)
129
+ )
130
+ ),
131
+ R.map(function (_ref2) {
132
+ var key = _ref2[0],
133
+ dimension = _ref2[1];
134
+ return React.createElement(
135
+ Grid,
136
+ { item: true, xs: 12, style: { minWidth: 320 }, key: key },
137
+ React.createElement(Select, _extends({}, dimension, {
138
+ onChange: dimension.onChange,
139
+ label: R.prop(key, labels),
140
+ value: getValue(dimension.value),
141
+ items: dimension.options
142
+ }))
143
+ );
144
+ }, dimensions)
145
+ )
146
+ )
147
+ )
62
148
  )
63
149
  ),
64
150
  React.createElement(
65
151
  Grid,
66
- { container: true, spacing: 2 },
67
- isActivePanel(['maxX', 'minX', 'pivotX', 'stepX'], properties) && React.createElement(
68
- Grid,
69
- {
70
- item: true,
71
- xs: 12,
72
- sm: 12,
73
- md: 12,
74
- lg: isActivePanel(['maxY', 'minY', 'pivotY', 'stepY'], properties) ? 6 : 12
75
- },
76
- React.createElement(AxisConfig, {
77
- icon: React.createElement(ArrowForwardIcon, null),
78
- label: R.prop('axisX', labels),
79
- labels: labels,
80
- max: R.prop('maxX', properties),
81
- min: R.prop('minX', properties),
82
- pivot: R.prop('pivotX', properties),
83
- step: R.prop('stepX', properties)
84
- })
152
+ { item: true, xs: 12, container: true, spacing: 2 },
153
+ React.createElement(
154
+ Proxy,
155
+ { keys: ['highlight', 'baseline'], properties: properties },
156
+ React.createElement(
157
+ Grid,
158
+ { item: true, xs: 12, md: 8, container: true, alignContent: 'flex-start' },
159
+ React.createElement(
160
+ Grid,
161
+ { item: true, xs: 12 },
162
+ React.createElement(Title, { label: labels.focus })
163
+ ),
164
+ React.createElement(
165
+ Grid,
166
+ { item: true, xs: 12 },
167
+ React.createElement(
168
+ Grid,
169
+ { container: true, spacing: 1 },
170
+ React.createElement(
171
+ Grid,
172
+ { item: true, xs: 12, style: { minWidth: 320 } },
173
+ React.createElement(Select, _extends({}, highlight, {
174
+ onChange: function onChange(ids) {
175
+ return highlight.onChange(R.props(ids, xhighlightOptions));
176
+ },
177
+ value: extractMultipleValue(highlight),
178
+ items: highlightOptions,
179
+ isMultiple: true,
180
+ isClearable: true,
181
+ label: R.prop('highlight', labels),
182
+ placeholder: R.prop('select', labels),
183
+ optionsKey: 'highlight'
184
+ }))
185
+ ),
186
+ React.createElement(
187
+ Grid,
188
+ { item: true, xs: 12, style: { minWidth: 320 } },
189
+ React.createElement(Select, _extends({}, baseline, {
190
+ onChange: function onChange(id) {
191
+ return baseline.onChange(R.pipe(R.props([id]), R.without(baseline.value))(xbaselineOptions));
192
+ },
193
+ value: extractMultipleValue(baseline),
194
+ items: baselineOptions,
195
+ isClearable: true,
196
+ label: R.prop('baseline', labels),
197
+ placeholder: R.prop('select', labels),
198
+ optionsKey: 'baseline'
199
+ }))
200
+ )
201
+ )
202
+ )
203
+ )
85
204
  ),
86
- isActivePanel(['freqStep'], properties) && React.createElement(
205
+ React.createElement(
87
206
  Grid,
88
- {
89
- item: true,
90
- xs: 12,
91
- sm: 12,
92
- md: 12,
93
- lg: isActivePanel(['maxY', 'minY', 'pivotY', 'stepY'], properties) ? 6 : 12
94
- },
95
- React.createElement(FrequencyConfig, {
96
- freqStep: R.prop('freqStep', properties),
97
- icon: React.createElement(ArrowForwardIcon, null),
98
- labels: labels
99
- })
207
+ { item: true, xs: 12, md: true, container: true, alignContent: 'flex-start' },
208
+ React.createElement(
209
+ Grid,
210
+ { item: true, xs: 12 },
211
+ React.createElement(Title, { label: labels.size })
212
+ ),
213
+ React.createElement(
214
+ Grid,
215
+ { item: true, xs: 12 },
216
+ React.createElement(
217
+ Grid,
218
+ { container: true, spacing: 1 },
219
+ React.createElement(InputProxy, {
220
+ pkey: 'width',
221
+ labels: labels,
222
+ properties: properties,
223
+ InputProps: {
224
+ endAdornment: React.createElement(
225
+ InputAdornment,
226
+ { position: 'end' },
227
+ 'px'
228
+ )
229
+ }
230
+ }),
231
+ React.createElement(InputProxy, {
232
+ pkey: 'height',
233
+ labels: labels,
234
+ properties: properties,
235
+ InputProps: {
236
+ endAdornment: React.createElement(
237
+ InputAdornment,
238
+ { position: 'end' },
239
+ 'px'
240
+ )
241
+ }
242
+ })
243
+ )
244
+ )
245
+ )
246
+ ),
247
+ React.createElement(
248
+ Grid,
249
+ { item: true, xs: 12, container: true, spacing: 2 },
250
+ React.createElement(
251
+ Proxy,
252
+ { keys: xKeys, properties: properties },
253
+ React.createElement(
254
+ Grid,
255
+ { item: true, xs: 12, md: true, container: true, className: classes.greyVariant },
256
+ React.createElement(
257
+ Grid,
258
+ { item: true, xs: 12 },
259
+ React.createElement(Title, { label: labels.axisX, icon: React.createElement(ArrowForwardIcon, null) })
260
+ ),
261
+ React.createElement(
262
+ Grid,
263
+ { item: true, xs: 12 },
264
+ React.createElement(
265
+ Grid,
266
+ { container: true, spacing: 1 },
267
+ R.map(function (key) {
268
+ return React.createElement(InputProxy, {
269
+ pkey: key,
270
+ mkey: R.init(key),
271
+ key: key,
272
+ sm: 12 / R.length(xKeys),
273
+ labels: labels,
274
+ properties: properties
275
+ });
276
+ }, xKeys)
277
+ )
278
+ )
279
+ )
100
280
  ),
101
- isActivePanel(['maxY', 'minY', 'pivotY', 'stepY'], properties) && React.createElement(
102
- Grid,
103
- {
104
- item: true,
105
- xs: 12,
106
- sm: 12,
107
- md: 12,
108
- lg: isActivePanel(['maxX', 'minX', 'pivotX', 'stepX', 'freqStep'], properties) ? 6 : 12
109
- },
110
- React.createElement(AxisConfig, {
111
- icon: React.createElement(ArrowUpwardIcon, null),
112
- label: R.prop('axisY', labels),
113
- labels: labels,
114
- max: R.prop('maxY', properties),
115
- min: R.prop('minY', properties),
116
- pivot: R.prop('pivotY', properties),
117
- step: R.prop('stepY', properties)
118
- })
281
+ React.createElement(
282
+ Proxy,
283
+ { keys: ['freqStep'], properties: properties },
284
+ React.createElement(
285
+ Grid,
286
+ { item: true, xs: 12, container: true, className: classes.greyVariant },
287
+ React.createElement(
288
+ Grid,
289
+ { item: true, xs: 12 },
290
+ React.createElement(Title, { label: labels.axisX, icon: React.createElement(ArrowForwardIcon, null) })
291
+ ),
292
+ React.createElement(
293
+ Grid,
294
+ { item: true, xs: 12 },
295
+ React.createElement(
296
+ Grid,
297
+ { container: true, spacing: 1 },
298
+ React.createElement(InputProxy, { pkey: 'freqStep', labels: labels, properties: properties })
299
+ )
300
+ )
301
+ )
119
302
  ),
120
- isActive(R.prop('display', properties)) && React.createElement(
303
+ React.createElement(
304
+ Proxy,
305
+ { keys: yKeys, properties: properties },
306
+ React.createElement(
307
+ Grid,
308
+ { item: true, xs: 12, md: true, container: true, className: classes.greyVariant },
309
+ React.createElement(
310
+ Grid,
311
+ { item: true, xs: 12 },
312
+ React.createElement(Title, { label: labels.axisY, icon: React.createElement(ArrowUpwardIcon, null) })
313
+ ),
314
+ React.createElement(
315
+ Grid,
316
+ { item: true, xs: 12 },
317
+ React.createElement(
318
+ Grid,
319
+ { container: true, spacing: 1 },
320
+ R.map(function (key) {
321
+ return React.createElement(InputProxy, {
322
+ pkey: key,
323
+ mkey: R.init(key),
324
+ key: key,
325
+ sm: 12 / R.length(yKeys),
326
+ labels: labels,
327
+ properties: properties
328
+ });
329
+ }, yKeys)
330
+ )
331
+ )
332
+ )
333
+ )
334
+ ),
335
+ React.createElement(
336
+ Proxy,
337
+ { keys: eKeys, properties: properties },
338
+ React.createElement(
121
339
  Grid,
122
- { item: true, xs: 12, className: classes.gridItemSpace },
123
- React.createElement(ButtonGroup, _extends({}, R.prop('display', properties), {
124
- label: R.prop('display', labels),
125
- labels: R.prop('displayOptions', labels)
126
- }))
340
+ { item: true, xs: 12, container: true, spacing: 2 },
341
+ React.createElement(
342
+ Grid,
343
+ { item: true, xs: 12, container: true },
344
+ React.createElement(DataEdit, { labels: labels, properties: properties })
345
+ )
127
346
  )
128
347
  ),
129
- isActivePanel(['title', 'subtitle', 'source', 'logo', 'copyright'], properties) && React.createElement(
130
- Fragment,
131
- null,
132
- React.createElement(Divider, { className: classes.divider }),
133
- React.createElement(DataEdit, { labels: labels, properties: properties })
348
+ React.createElement(
349
+ Proxy,
350
+ { keys: ['displayMode'], properties: properties },
351
+ React.createElement(
352
+ Grid,
353
+ { item: true, xs: 12, container: true, spacing: 2 },
354
+ React.createElement(
355
+ Grid,
356
+ { item: true, xs: 12, container: true },
357
+ React.createElement(
358
+ Grid,
359
+ { item: true, container: true, spacing: 1, alignItems: 'center', style: { minWidth: 320 } },
360
+ React.createElement(
361
+ Grid,
362
+ { item: true, xs: true },
363
+ React.createElement(
364
+ Typography,
365
+ { variant: 'body2' },
366
+ labels.display
367
+ )
368
+ ),
369
+ R.map(function (option) {
370
+ return React.createElement(
371
+ Grid,
372
+ { item: true, key: option.value },
373
+ React.createElement(
374
+ Button,
375
+ {
376
+ variant: option.value === displayMode.value ? 'contained' : 'outlined',
377
+ onClick: function onClick() {
378
+ return displayMode.onChange(option.value);
379
+ },
380
+ color: 'primary'
381
+ },
382
+ React.createElement(
383
+ Typography,
384
+ { variant: 'body2' },
385
+ R.path(['displayOptions', option.value], labels)
386
+ )
387
+ )
388
+ );
389
+ }, displayModeOptions)
390
+ )
391
+ )
392
+ )
134
393
  )
135
394
  );
136
395
  };
@@ -170,7 +429,7 @@ var multiSelectableInputProptypes = PropTypes.shape({
170
429
  }))
171
430
  });
172
431
 
173
- ChartsConfig.propTypes = process.env.NODE_ENV !== "production" ? {
432
+ ChartConfig.propTypes = process.env.NODE_ENV !== "production" ? {
174
433
  labels: PropTypes.object,
175
434
  properties: PropTypes.shape({
176
435
  highlight: multiSelectableInputProptypes,
@@ -206,11 +465,4 @@ ChartsConfig.propTypes = process.env.NODE_ENV !== "production" ? {
206
465
  })
207
466
  } : {};
208
467
 
209
- export default withBlank(function (_ref2) {
210
- var isBlank = _ref2.isBlank,
211
- _ref2$properties = _ref2.properties,
212
- properties = _ref2$properties === undefined ? {} : _ref2$properties;
213
- return {
214
- isBlank: R.or(isBlank, R.isEmpty(properties))
215
- };
216
- })(ChartsConfig);
468
+ export default ChartConfig;
@@ -125,6 +125,7 @@ var MyInput = function MyInput(_ref3) {
125
125
  },
126
126
  onBlur: handleBlur,
127
127
  margin: 'dense',
128
+ size: 'small',
128
129
  variant: 'outlined',
129
130
  onKeyPress: onEnterLabel,
130
131
  onChange: handleChange,
@@ -0,0 +1,54 @@
1
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
2
+
3
+ import React from 'react';
4
+ import PropTypes from 'prop-types';
5
+ import * as R from 'ramda';
6
+ import { Grid } from '@material-ui/core';
7
+ import Input from './Input';
8
+
9
+ var InputProxy = function InputProxy(_ref) {
10
+ var _ref$minWidth = _ref.minWidth,
11
+ minWidth = _ref$minWidth === undefined ? 220 : _ref$minWidth,
12
+ _ref$properties = _ref.properties,
13
+ properties = _ref$properties === undefined ? {} : _ref$properties,
14
+ _ref$labels = _ref.labels,
15
+ labels = _ref$labels === undefined ? {} : _ref$labels,
16
+ pkey = _ref.pkey,
17
+ mkey = _ref.mkey,
18
+ _ref$xs = _ref.xs,
19
+ xs = _ref$xs === undefined ? 12 : _ref$xs,
20
+ _ref$sm = _ref.sm,
21
+ sm = _ref$sm === undefined ? 12 : _ref$sm,
22
+ _ref$InputProps = _ref.InputProps,
23
+ InputProps = _ref$InputProps === undefined ? {} : _ref$InputProps;
24
+
25
+ if (R.isNil(pkey)) return null;
26
+ if (!R.has(pkey, properties)) return null;
27
+
28
+ var prop = R.propOr({}, pkey, properties);
29
+
30
+ return React.createElement(
31
+ Grid,
32
+ { item: true, xs: xs, sm: sm, style: { minWidth: minWidth } },
33
+ React.createElement(Input, _extends({}, prop, {
34
+ value: R.when(R.isNil, R.always(''))(prop.value),
35
+ type: 'number',
36
+ label: R.prop(mkey || pkey, labels),
37
+ fullWidth: true,
38
+ InputProps: R.mergeRight({ endAdornment: null }, InputProps)
39
+ }))
40
+ );
41
+ };
42
+
43
+ InputProxy.propTypes = process.env.NODE_ENV !== "production" ? {
44
+ minWidth: PropTypes.number,
45
+ properties: PropTypes.object,
46
+ labels: PropTypes.object,
47
+ pkey: PropTypes.string,
48
+ mkey: PropTypes.string,
49
+ xs: PropTypes.number,
50
+ sm: PropTypes.number,
51
+ InputProps: PropTypes.object
52
+ } : {};
53
+
54
+ export default InputProxy;
@@ -0,0 +1,20 @@
1
+ import PropTypes from 'prop-types';
2
+ import * as R from 'ramda';
3
+
4
+ var Proxy = function Proxy(_ref) {
5
+ var keys = _ref.keys,
6
+ properties = _ref.properties,
7
+ children = _ref.children;
8
+
9
+ if (!R.any(R.flip(R.has)(properties), keys)) return null;
10
+
11
+ return children;
12
+ };
13
+
14
+ Proxy.propTypes = {
15
+ children: PropTypes.node,
16
+ keys: PropTypes.array,
17
+ properties: PropTypes.object
18
+ };
19
+
20
+ export default Proxy;
@@ -0,0 +1,38 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import * as R from 'ramda';
4
+ import { makeStyles } from '@material-ui/core/styles';
5
+ import { Grid, Typography } from '@material-ui/core';
6
+
7
+ export var useStyles = makeStyles(function () {
8
+ return {
9
+ title: {
10
+ fontFamily: 'inherit'
11
+ }
12
+ };
13
+ });
14
+
15
+ var Title = function Title(_ref) {
16
+ var icon = _ref.icon,
17
+ label = _ref.label;
18
+
19
+ var classes = useStyles();
20
+
21
+ return React.createElement(
22
+ Grid,
23
+ { container: true },
24
+ !R.isNil(icon) && icon,
25
+ React.createElement(
26
+ Typography,
27
+ { variant: 'h6', className: classes.title, inline: 'true' },
28
+ label
29
+ )
30
+ );
31
+ };
32
+
33
+ Title.propTypes = process.env.NODE_ENV !== "production" ? {
34
+ label: PropTypes.string,
35
+ icon: PropTypes.node
36
+ } : {};
37
+
38
+ export default Title;
@@ -203,7 +203,7 @@
203
203
  * mixins: {
204
204
  * chartsConfig: {
205
205
  * root: {
206
- * // font, color of the complete composant execpt "Axis" part
206
+ * // font, color of the complete component except "Axis" part
207
207
  * }
208
208
  * }
209
209
  * }
@@ -0,0 +1,9 @@
1
+ import * as R from 'ramda';
2
+
3
+ var useAxisOptions = function useAxisOptions(properties, suffix) {
4
+ var keys = ['min' + suffix, 'max' + suffix, 'pivot' + suffix, 'step' + suffix];
5
+
6
+ return R.pipe(R.pick(keys), R.keys)(properties);
7
+ };
8
+
9
+ export default useAxisOptions;
@@ -0,0 +1,12 @@
1
+ import { useMemo } from 'react';
2
+ import * as R from 'ramda';
3
+
4
+ var useDimensionOptions = function useDimensionOptions(properties) {
5
+ var dimensions = useMemo(function () {
6
+ return R.pipe(R.pick(['scatterDimension', 'scatterX', 'scatterY', 'symbolDimension', 'stackedDimension']), R.toPairs)(properties);
7
+ }, [properties]);
8
+
9
+ return [dimensions];
10
+ };
11
+
12
+ export default useDimensionOptions;