@sis-cc/dotstatsuite-components 18.1.0 → 19.0.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/.gitlab-ci.yml +1 -1
- package/lib/app.js +3 -16
- package/lib/viewer/src/app/use-case-1.js +2 -21
- package/lib/viewer/src/app.js +17 -28
- package/package.json +11 -22
- package/src/app.js +4 -11
- package/src/viewer/src/app/use-case-1.js +0 -18
- package/src/viewer/src/app.js +6 -9
package/.gitlab-ci.yml
CHANGED
package/lib/app.js
CHANGED
|
@@ -6,29 +6,16 @@ var _react2 = _interopRequireDefault(_react);
|
|
|
6
6
|
|
|
7
7
|
var _client = require('react-dom/client');
|
|
8
8
|
|
|
9
|
-
var _app = require('./viewer/src/app');
|
|
10
|
-
|
|
11
|
-
var _app2 = _interopRequireDefault(_app);
|
|
12
|
-
|
|
13
|
-
var _dotstatsuiteVisions = require('@sis-cc/dotstatsuite-visions');
|
|
14
|
-
|
|
15
|
-
var _styles = require('@mui/material/styles');
|
|
16
|
-
|
|
17
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
10
|
|
|
19
|
-
var theme = (0, _styles.createTheme)((0, _dotstatsuiteVisions.sisccTheme)({ rtl: 'ltr' }));
|
|
20
11
|
var container = document.getElementById('root');
|
|
21
12
|
var root = (0, _client.createRoot)(container);
|
|
22
13
|
|
|
23
14
|
var App = function App() {
|
|
24
15
|
return _react2.default.createElement(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
_styles.ThemeProvider,
|
|
29
|
-
{ theme: theme },
|
|
30
|
-
_react2.default.createElement(_app2.default, null)
|
|
31
|
-
)
|
|
16
|
+
_react.StrictMode,
|
|
17
|
+
null,
|
|
18
|
+
'I\'m not groot, I\'m component'
|
|
32
19
|
);
|
|
33
20
|
};
|
|
34
21
|
|
|
@@ -26,29 +26,11 @@ var _oecdHEALTH_PROT = require('../../../rules/test/oecd-HEALTH_PROT.json');
|
|
|
26
26
|
|
|
27
27
|
var _oecdHEALTH_PROT2 = _interopRequireDefault(_oecdHEALTH_PROT);
|
|
28
28
|
|
|
29
|
-
var _dotstatsuiteVisions = require('@sis-cc/dotstatsuite-visions');
|
|
30
|
-
|
|
31
29
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
|
32
30
|
|
|
33
31
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
34
32
|
|
|
35
|
-
|
|
36
|
-
<div style={{display: 'flex', flexWrap: 'wrap'}}>
|
|
37
|
-
{R.map(([key, value]) => (
|
|
38
|
-
<React.Fragment key={key}>
|
|
39
|
-
<div style={{width: value - 1, margin: 10}}>
|
|
40
|
-
<h5>{key}: {value}px</h5>
|
|
41
|
-
<Viewer {...rowData()} chartOptions={options} type="RowChart" />
|
|
42
|
-
</div>
|
|
43
|
-
<div style={{width: value - 1, margin: 10}}>
|
|
44
|
-
<h5>{key}: {value}px</h5>
|
|
45
|
-
<Viewer {...stackData()} chartOptions={options} type="StackedBarChart" />
|
|
46
|
-
</div>
|
|
47
|
-
</React.Fragment>
|
|
48
|
-
), R.toPairs(T4_BREAKPOINTS))}
|
|
49
|
-
</div>
|
|
50
|
-
);*/
|
|
51
|
-
|
|
33
|
+
//import stackData from '../../mocks/stack';
|
|
52
34
|
exports.default = function (_ref) {
|
|
53
35
|
var config = _ref.config,
|
|
54
36
|
style = _ref.style,
|
|
@@ -75,5 +57,4 @@ exports.default = function (_ref) {
|
|
|
75
57
|
},
|
|
76
58
|
type: type
|
|
77
59
|
});
|
|
78
|
-
};
|
|
79
|
-
//import stackData from '../../mocks/stack';
|
|
60
|
+
};
|
package/lib/viewer/src/app.js
CHANGED
|
@@ -12,10 +12,6 @@ var _react = require('react');
|
|
|
12
12
|
|
|
13
13
|
var _react2 = _interopRequireDefault(_react);
|
|
14
14
|
|
|
15
|
-
var _reactHelmet = require('react-helmet');
|
|
16
|
-
|
|
17
|
-
var _core = require('@blueprintjs/core');
|
|
18
|
-
|
|
19
15
|
var _styles = require('@mui/material/styles');
|
|
20
16
|
|
|
21
17
|
var _dotstatsuiteVisions = require('@sis-cc/dotstatsuite-visions');
|
|
@@ -62,9 +58,9 @@ var AppTab = function AppTab(_ref) {
|
|
|
62
58
|
var label = _ref.label,
|
|
63
59
|
iconName = _ref.iconName;
|
|
64
60
|
return _react2.default.createElement(
|
|
65
|
-
|
|
66
|
-
{ content: label, position:
|
|
67
|
-
_react2.default.createElement(
|
|
61
|
+
Tooltip,
|
|
62
|
+
{ content: label, position: Position.RIGHT },
|
|
63
|
+
_react2.default.createElement(Icon, { iconName: iconName })
|
|
68
64
|
);
|
|
69
65
|
};
|
|
70
66
|
|
|
@@ -149,25 +145,18 @@ exports.default = function () {
|
|
|
149
145
|
|
|
150
146
|
*/
|
|
151
147
|
|
|
152
|
-
return
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
_react2.default.createElement(_core.Tab2, {
|
|
167
|
-
id: 'uc1',
|
|
168
|
-
title: _react2.default.createElement(AppTab, { label: 'full screen resizable chart', iconName: 'fullscreen' }),
|
|
169
|
-
panel: _react2.default.createElement(_useCase2.default, { isRtl: isRtl, config: config, style: style, options: options })
|
|
170
|
-
})
|
|
171
|
-
)
|
|
172
|
-
);
|
|
148
|
+
return {/* <div style={{ padding: 10 }}>
|
|
149
|
+
<StyledEngineProvider injectFirst>
|
|
150
|
+
<ThemeProvider theme={theme}>
|
|
151
|
+
<button onClick={() => setRtl(!isRtl)}>{isRtl ? 'left to right' : 'right to left'}</button>
|
|
152
|
+
<Tabs2 renderActiveTabPanelOnly={false}>
|
|
153
|
+
<Tab2
|
|
154
|
+
id="uc1"
|
|
155
|
+
title={<AppTab label="full screen resizable chart" iconName="fullscreen" />}
|
|
156
|
+
panel={<UseCase1 isRtl={isRtl} config={config} style={style} options={options} />}
|
|
157
|
+
/>
|
|
158
|
+
</Tabs2>
|
|
159
|
+
</ThemeProvider>
|
|
160
|
+
</StyledEngineProvider>
|
|
161
|
+
</div> */};
|
|
173
162
|
};
|
package/package.json
CHANGED
|
@@ -1,36 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sis-cc/dotstatsuite-components",
|
|
3
3
|
"description": "Set components based on React.",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "19.0.0",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
|
+
"type": "module",
|
|
6
7
|
"author": "OECD",
|
|
7
8
|
"license": "MIT",
|
|
8
9
|
"scripts": {
|
|
9
10
|
"build": "wce build",
|
|
10
11
|
"start": "wce start",
|
|
11
|
-
"test": "wce test"
|
|
12
|
-
"demo": "wce bundle --app --relative && mv dist public"
|
|
12
|
+
"test": "wce test"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@blueprintjs/core": "^1.22.0",
|
|
16
|
-
"@mui/material": "^5.16.5",
|
|
17
|
-
"@mui/styles": "^5.16.5",
|
|
18
|
-
"@sis-cc/dotstatsuite-sdmxjs": "*",
|
|
19
|
-
"@sis-cc/dotstatsuite-visions": "*",
|
|
20
|
-
"react": "^18",
|
|
21
|
-
"react-dom": "^18",
|
|
22
|
-
"react-addons-css-transition-group": "^15.6.2",
|
|
23
|
-
"react-helmet": "^5.2.1",
|
|
24
15
|
"web-component-env": "^2.0.0"
|
|
25
16
|
},
|
|
26
17
|
"dependencies": {
|
|
27
|
-
"@emotion/react": "^11.13.3",
|
|
28
|
-
"@emotion/styled": "^11.13.0",
|
|
29
|
-
"@mui/icons-material": "^5.16.5",
|
|
30
|
-
"@mui/material": "^5.16.5",
|
|
31
|
-
"@mui/styles": "^5.16.5",
|
|
32
18
|
"@react-hook/size": "^2.1.1",
|
|
33
|
-
"@sis-cc/dotstatsuite-d3-charts": "
|
|
19
|
+
"@sis-cc/dotstatsuite-d3-charts": "~8.3.0",
|
|
20
|
+
"@sis-cc/dotstatsuite-sdmxjs": "~10.1.0",
|
|
21
|
+
"@sis-cc/dotstatsuite-visions": "~12.2.0",
|
|
34
22
|
"date-fns": "^1.30.1",
|
|
35
23
|
"lodash": "^4.17.2",
|
|
36
24
|
"lodash.compose": "^2.4.1",
|
|
@@ -40,10 +28,11 @@
|
|
|
40
28
|
"ramda": "^0.26.1"
|
|
41
29
|
},
|
|
42
30
|
"peerDependencies": {
|
|
43
|
-
"@
|
|
44
|
-
"@
|
|
45
|
-
"@
|
|
46
|
-
"@
|
|
31
|
+
"@emotion/react": "^11",
|
|
32
|
+
"@emotion/styled": "^11",
|
|
33
|
+
"@mui/icons-material": "^5",
|
|
34
|
+
"@mui/material": "^5",
|
|
35
|
+
"@mui/styles": "^5",
|
|
47
36
|
"react": "^18",
|
|
48
37
|
"react-dom": "^18"
|
|
49
38
|
}
|
package/src/app.js
CHANGED
|
@@ -1,20 +1,13 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { StrictMode } from 'react';
|
|
2
2
|
import { createRoot } from 'react-dom/client';
|
|
3
|
-
import ViewerApp from './viewer/src/app';
|
|
4
|
-
import { sisccTheme } from '@sis-cc/dotstatsuite-visions';
|
|
5
|
-
import { ThemeProvider, StyledEngineProvider } from '@mui/material/styles';
|
|
6
|
-
import { createTheme } from '@mui/material/styles';
|
|
7
3
|
|
|
8
|
-
const theme = createTheme(sisccTheme({ rtl: 'ltr' }));
|
|
9
4
|
const container = document.getElementById('root');
|
|
10
5
|
const root = createRoot(container);
|
|
11
6
|
|
|
12
7
|
const App = () => (
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
</ThemeProvider>
|
|
17
|
-
</StyledEngineProvider>
|
|
8
|
+
<StrictMode>
|
|
9
|
+
I'm not groot, I'm component
|
|
10
|
+
</StrictMode>
|
|
18
11
|
);
|
|
19
12
|
|
|
20
13
|
root.render(<App />);
|
|
@@ -5,24 +5,6 @@ import rowData from '../../mocks/row';
|
|
|
5
5
|
//import stackData from '../../mocks/stack';
|
|
6
6
|
import { series } from '../../../rules/src';
|
|
7
7
|
import data from '../../../rules/test/oecd-HEALTH_PROT.json';
|
|
8
|
-
import { T4_BREAKPOINTS } from '@sis-cc/dotstatsuite-visions';
|
|
9
|
-
|
|
10
|
-
/*return (
|
|
11
|
-
<div style={{display: 'flex', flexWrap: 'wrap'}}>
|
|
12
|
-
{R.map(([key, value]) => (
|
|
13
|
-
<React.Fragment key={key}>
|
|
14
|
-
<div style={{width: value - 1, margin: 10}}>
|
|
15
|
-
<h5>{key}: {value}px</h5>
|
|
16
|
-
<Viewer {...rowData()} chartOptions={options} type="RowChart" />
|
|
17
|
-
</div>
|
|
18
|
-
<div style={{width: value - 1, margin: 10}}>
|
|
19
|
-
<h5>{key}: {value}px</h5>
|
|
20
|
-
<Viewer {...stackData()} chartOptions={options} type="StackedBarChart" />
|
|
21
|
-
</div>
|
|
22
|
-
</React.Fragment>
|
|
23
|
-
), R.toPairs(T4_BREAKPOINTS))}
|
|
24
|
-
</div>
|
|
25
|
-
);*/
|
|
26
8
|
|
|
27
9
|
export default ({ config, style, options }) => {
|
|
28
10
|
const type = 'StackedRowChart';
|
package/src/viewer/src/app.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { Helmet } from 'react-helmet';
|
|
3
|
-
import { Tab2, Tabs2, Intent, Icon, Tooltip, Position } from '@blueprintjs/core';
|
|
4
2
|
import { ThemeProvider, StyledEngineProvider } from '@mui/material/styles';
|
|
5
3
|
import { createTheme } from '@mui/material/styles';
|
|
6
4
|
import { sisccTheme } from '@sis-cc/dotstatsuite-visions';
|
|
@@ -100,10 +98,9 @@ export default () => {
|
|
|
100
98
|
*/
|
|
101
99
|
|
|
102
100
|
return (
|
|
103
|
-
<div style={{ padding: 10 }}>
|
|
104
|
-
|
|
105
|
-
<ThemeProvider theme={theme}>
|
|
106
|
-
<Helmet htmlAttributes={{ dir: isRtl ? 'rtl' : 'ltr' }} />
|
|
101
|
+
{/* <div style={{ padding: 10 }}>
|
|
102
|
+
<StyledEngineProvider injectFirst>
|
|
103
|
+
<ThemeProvider theme={theme}>
|
|
107
104
|
<button onClick={() => setRtl(!isRtl)}>{isRtl ? 'left to right' : 'right to left'}</button>
|
|
108
105
|
<Tabs2 renderActiveTabPanelOnly={false}>
|
|
109
106
|
<Tab2
|
|
@@ -112,8 +109,8 @@ export default () => {
|
|
|
112
109
|
panel={<UseCase1 isRtl={isRtl} config={config} style={style} options={options} />}
|
|
113
110
|
/>
|
|
114
111
|
</Tabs2>
|
|
115
|
-
|
|
116
|
-
</StyledEngineProvider>
|
|
117
|
-
</div>
|
|
112
|
+
</ThemeProvider>
|
|
113
|
+
</StyledEngineProvider>
|
|
114
|
+
</div> */}
|
|
118
115
|
);
|
|
119
116
|
};
|