@sis-cc/dotstatsuite-components 8.10.0 → 8.12.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 (44) hide show
  1. package/lib/app.js +13 -5
  2. package/lib/rules/src/chart/getChartOptions.js +1 -1
  3. package/lib/rules/src/properties/index.js +1 -0
  4. package/lib/rules-driver/src/app.js +116 -167
  5. package/lib/viewer/src/app/use-case-3.js +52 -0
  6. package/lib/viewer/src/app.js +9 -0
  7. package/lib/viewer/src/chartUtils/series.js +3 -5
  8. package/lib/viewer/src/index.js +1 -1
  9. package/package.json +2 -2
  10. package/src/app.js +10 -5
  11. package/src/rules/src/chart/getChartOptions.js +2 -2
  12. package/src/rules/src/properties/index.js +1 -0
  13. package/src/rules-driver/src/app.js +116 -132
  14. package/src/rules-driver/src/mocks/data1.json +332 -0
  15. package/src/rules-driver/src/mocks/data2.json +309 -0
  16. package/src/viewer/src/app/use-case-3.js +18 -0
  17. package/src/viewer/src/app.js +6 -0
  18. package/src/viewer/src/chartUtils/series.js +4 -4
  19. package/src/viewer/src/index.js +2 -2
  20. package/lib/rules-driver/src/app/chart.js +0 -52
  21. package/lib/rules-driver/src/app/config-axis.js +0 -95
  22. package/lib/rules-driver/src/app/config-buttons.js +0 -47
  23. package/lib/rules-driver/src/app/config-input.js +0 -51
  24. package/lib/rules-driver/src/app/config-select.js +0 -57
  25. package/lib/rules-driver/src/app/config-t4size.js +0 -61
  26. package/lib/rules-driver/src/app/config1.js +0 -148
  27. package/lib/rules-driver/src/app/menu.js +0 -44
  28. package/lib/rules-driver/src/app/viewer1.js +0 -39
  29. package/lib/rules-driver/src/app/viewer2.js +0 -115
  30. package/src/rules-driver/src/app/chart.js +0 -18
  31. package/src/rules-driver/src/app/config-axis.js +0 -54
  32. package/src/rules-driver/src/app/config-buttons.js +0 -27
  33. package/src/rules-driver/src/app/config-input.js +0 -35
  34. package/src/rules-driver/src/app/config-select.js +0 -25
  35. package/src/rules-driver/src/app/config-t4size.js +0 -50
  36. package/src/rules-driver/src/app/config1.js +0 -120
  37. package/src/rules-driver/src/app/menu.js +0 -27
  38. package/src/rules-driver/src/app/viewer1.js +0 -18
  39. package/src/rules-driver/src/app/viewer2.js +0 -77
  40. package/src/rules-driver/src/mocks/ecb.json +0 -2069
  41. package/src/rules-driver/src/mocks/ins.json +0 -264
  42. package/src/rules-driver/src/mocks/oecd-time.json +0 -864
  43. package/src/rules-driver/src/mocks/oecd.json +0 -372
  44. package/src/rules-driver/src/mocks/tunisia.json +0 -333
@@ -1,120 +0,0 @@
1
- import React from 'react';
2
- import _ConfigSelect from './config-select';
3
- import _ConfigInput from './config-input';
4
- import _ConfigButtons from './config-buttons';
5
- import ConfigAxis from './config-axis';
6
- import { prop } from 'ramda';
7
- import glamorous from 'glamorous';
8
-
9
- const activeComponent = (Component) => ({ isActive, ...rest }) => isActive ? <Component {...rest} /> : null;
10
-
11
- const ConfigSelect = activeComponent(_ConfigSelect);
12
- const ConfigInput = activeComponent(_ConfigInput);
13
- const ConfigButtons = activeComponent(_ConfigButtons);
14
-
15
- const GDiv = glamorous.div({ width: '100%' });
16
-
17
- const Axes = glamorous.div({
18
- display: 'flex',
19
- flexDirection: 'column',
20
- justifyContent: 'space-between'
21
- });
22
-
23
- const Config = ({ properties }) => {
24
- return (
25
- <GDiv>
26
- <ConfigInput
27
- {...prop('title', properties)}
28
- isControlled={true}
29
- label="Title of the Chart"
30
- placeholder="Enter a chart title"
31
- />
32
- <ConfigInput
33
- {...prop('subtitle', properties)}
34
- isControlled={true}
35
- label="Subtitle of the Chart"
36
- placeholder="Enter a chart subtitle"
37
- />
38
- <ConfigInput
39
- {...prop('width', properties)}
40
- isControlled={false}
41
- label="Width of the Chart"
42
- leftIcon="arrows-horizontal"
43
- placeholder="Enter a numerical value"
44
- />
45
- <ConfigInput
46
- {...prop('height', properties)}
47
- isControlled={false}
48
- label="Height of the Chart"
49
- leftIcon="arrows-vertical"
50
- placeholder="Enter a numerical value"
51
- />
52
- <ConfigSelect
53
- {...prop('scatterDimension', properties)}
54
- label="Scatter Dimension"
55
- multi={false}
56
- clearable={false}
57
- />
58
- <ConfigSelect
59
- {...prop('scatterX', properties)}
60
- label="Scatter Value For X Axis"
61
- multi={false}
62
- clearable={false}
63
- />
64
- <ConfigSelect
65
- {...prop('scatterY', properties)}
66
- label="Scatter Value For Y Axis"
67
- multi={false}
68
- clearable={false}
69
- />
70
- <ConfigSelect
71
- {...prop('symbolDimension', properties)}
72
- label="Symbol Dimension"
73
- multi={false}
74
- clearable={false}
75
- />
76
- <ConfigSelect
77
- {...prop('stackedDimension', properties)}
78
- label="Stacked Dimension"
79
- multi={false}
80
- clearable={false}
81
- />
82
- <ConfigSelect
83
- {...prop('highlight', properties)}
84
- label="Highlight Selection"
85
- multi={true}
86
- clearable={true}
87
- />
88
- <ConfigSelect
89
- {...prop('baseline', properties)}
90
- label="Baseline Selection"
91
- multi={false}
92
- clearable={true}
93
- />
94
- <ConfigButtons
95
- {...prop('display', properties)}
96
- />
97
- <ConfigInput
98
- {...prop('freqStep', properties)}
99
- isControlled={false}
100
- label="Timeline Axis Frequency Step"
101
- />
102
- <ConfigAxis
103
- label="Axe X"
104
- max={prop('maxX', properties)}
105
- min={prop('minX', properties)}
106
- pivot={prop('pivotX', properties)}
107
- step={prop('stepX', properties)}
108
- />
109
- <ConfigAxis
110
- label="Axe Y"
111
- max={prop('maxY', properties)}
112
- min={prop('minY', properties)}
113
- pivot={prop('pivotY', properties)}
114
- step={prop('stepY', properties)}
115
- />
116
- </GDiv>
117
- );
118
- };
119
-
120
- export default Config;
@@ -1,27 +0,0 @@
1
- import React from 'react';
2
- import { Button } from '@blueprintjs/core';
3
- import { map } from 'ramda';
4
-
5
- const Menu = ({ align, iconName, items, onChange, selected }) => {
6
- return (
7
- <div className={`pt-navbar-group pt-align-${align}`}>
8
- {
9
- map(
10
- ({ label, value }) => (
11
- <Button
12
- className="pt-minimal"
13
- iconName={iconName}
14
- onClick={() => onChange(value)}
15
- active={value === selected}
16
- key={value}
17
- text={label}
18
- />
19
- ),
20
- items
21
- )
22
- }
23
- </div>
24
- );
25
- };
26
-
27
- export default Menu;
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import Chart from './chart';
3
- import Config from './config1';
4
-
5
- const Viewer = ({ chartData, chartOptions, properties, type }) => {
6
- return (
7
- <div>
8
- <Chart
9
- data={chartData}
10
- options={chartOptions}
11
- type={type}
12
- />
13
- <Config properties={properties} />
14
- </div>
15
- )
16
- };
17
-
18
- export default Viewer;
@@ -1,77 +0,0 @@
1
- import React from 'react';
2
- import Chart from './chart';
3
- import ConfigT4 from './config-t4size';
4
- import { path } from 'ramda';
5
- import _ConfigSelect from './config-select';
6
- import * as R from 'ramda';
7
-
8
- const activeComponent = (Component) => ({ isActive, ...rest }) => isActive ? <Component {...rest} /> : null;
9
-
10
- const ConfigSelect = activeComponent(_ConfigSelect);
11
-
12
- const Viewer = ({ chartData, chartOptions, onChange, properties, type }) => (
13
- <div>
14
- <ConfigT4
15
- height={path(['height', 'value'], properties)}
16
- onChange={onChange}
17
- width={path(['width', 'value'], properties)}
18
- />
19
- <ConfigSelect
20
- {...properties.display}
21
- label="Display as"
22
- onChange={selection => properties.display.onChange(selection.value)}
23
- clearable={false}
24
- multi={false}
25
- value={R.find(R.propEq('value', properties.display.value), properties.display.options)}
26
- />
27
- <Chart
28
- data={chartData}
29
- options={chartOptions}
30
- type={type}
31
- />
32
- <ConfigSelect
33
- {...R.prop('scatterDimension', properties)}
34
- label="Scatter Dimension"
35
- multi={false}
36
- clearable={false}
37
- />
38
- <ConfigSelect
39
- {...R.prop('scatterX', properties)}
40
- label="Scatter Value For X Axis"
41
- multi={false}
42
- clearable={false}
43
- />
44
- <ConfigSelect
45
- {...R.prop('scatterY', properties)}
46
- label="Scatter Value For Y Axis"
47
- multi={false}
48
- clearable={false}
49
- />
50
- <ConfigSelect
51
- {...R.prop('symbolDimension', properties)}
52
- label="Symbol Dimension"
53
- multi={false}
54
- clearable={false}
55
- />
56
- <ConfigSelect
57
- {...R.prop('stackedDimension', properties)}
58
- label="Stacked Dimension"
59
- multi={false}
60
- clearable={false}
61
- />
62
- <ConfigSelect
63
- {...R.prop('highlight', properties)}
64
- label="Highlight Selection"
65
- multi={true}
66
- clearable={true}
67
- />
68
- <ConfigSelect
69
- {...R.prop('baseline', properties)}
70
- label="Baseline Selection"
71
- multi={false}
72
- clearable={true}
73
- />
74
- </div>
75
- );
76
-
77
- export default Viewer;