@sis-cc/dotstatsuite-components 17.32.0 → 18.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/lib/app.js +8 -4
- package/lib/viewer/src/app.js +16 -20
- package/lib/viewer/src/index.js +1 -1
- package/lib/viewer/src/legends/AxisLegend.js +4 -2
- package/lib/viewer/src/legends/ChartLegends.js +1 -1
- package/lib/viewer/src/legends/Legend.js +4 -2
- package/package.json +10 -3
- package/src/app.js +7 -5
- package/src/viewer/src/app.js +16 -14
- package/src/viewer/src/index.js +1 -1
- package/src/viewer/src/legends/AxisLegend.js +1 -1
- package/src/viewer/src/legends/ChartLegends.js +1 -1
- package/src/viewer/src/legends/Legend.js +1 -1
package/lib/app.js
CHANGED
|
@@ -12,7 +12,7 @@ var _app2 = _interopRequireDefault(_app);
|
|
|
12
12
|
|
|
13
13
|
var _dotstatsuiteVisions = require('@sis-cc/dotstatsuite-visions');
|
|
14
14
|
|
|
15
|
-
var _styles = require('@material
|
|
15
|
+
var _styles = require('@mui/material/styles');
|
|
16
16
|
|
|
17
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
18
|
|
|
@@ -22,9 +22,13 @@ var root = (0, _client.createRoot)(container);
|
|
|
22
22
|
|
|
23
23
|
var App = function App() {
|
|
24
24
|
return _react2.default.createElement(
|
|
25
|
-
_styles.
|
|
26
|
-
{
|
|
27
|
-
_react2.default.createElement(
|
|
25
|
+
_styles.StyledEngineProvider,
|
|
26
|
+
{ injectFirst: true },
|
|
27
|
+
_react2.default.createElement(
|
|
28
|
+
_styles.ThemeProvider,
|
|
29
|
+
{ theme: theme },
|
|
30
|
+
_react2.default.createElement(_app2.default, null)
|
|
31
|
+
)
|
|
28
32
|
);
|
|
29
33
|
};
|
|
30
34
|
|
package/lib/viewer/src/app.js
CHANGED
|
@@ -16,7 +16,7 @@ var _reactHelmet = require('react-helmet');
|
|
|
16
16
|
|
|
17
17
|
var _core = require('@blueprintjs/core');
|
|
18
18
|
|
|
19
|
-
var _styles = require('@material
|
|
19
|
+
var _styles = require('@mui/material/styles');
|
|
20
20
|
|
|
21
21
|
var _dotstatsuiteVisions = require('@sis-cc/dotstatsuite-visions');
|
|
22
22
|
|
|
@@ -152,26 +152,22 @@ exports.default = function () {
|
|
|
152
152
|
return _react2.default.createElement(
|
|
153
153
|
'div',
|
|
154
154
|
{ style: { padding: 10 } },
|
|
155
|
+
_react2.default.createElement(_reactHelmet.Helmet, { htmlAttributes: { dir: isRtl ? 'rtl' : 'ltr' } }),
|
|
155
156
|
_react2.default.createElement(
|
|
156
|
-
|
|
157
|
-
{
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
{
|
|
169
|
-
|
|
170
|
-
id: 'uc1',
|
|
171
|
-
title: _react2.default.createElement(AppTab, { label: 'full screen resizable chart', iconName: 'fullscreen' }),
|
|
172
|
-
panel: _react2.default.createElement(_useCase2.default, { isRtl: isRtl, config: config, style: style, options: options })
|
|
173
|
-
})
|
|
174
|
-
)
|
|
157
|
+
'button',
|
|
158
|
+
{ onClick: function onClick() {
|
|
159
|
+
return setRtl(!isRtl);
|
|
160
|
+
} },
|
|
161
|
+
isRtl ? 'left to right' : 'right to left'
|
|
162
|
+
),
|
|
163
|
+
_react2.default.createElement(
|
|
164
|
+
_core.Tabs2,
|
|
165
|
+
{ renderActiveTabPanelOnly: false },
|
|
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
|
+
})
|
|
175
171
|
)
|
|
176
172
|
);
|
|
177
173
|
};
|
package/lib/viewer/src/index.js
CHANGED
|
@@ -38,7 +38,7 @@ var _size2 = _interopRequireDefault(_size);
|
|
|
38
38
|
|
|
39
39
|
var _dotstatsuiteVisions = require('@sis-cc/dotstatsuite-visions');
|
|
40
40
|
|
|
41
|
-
var _styles = require('@
|
|
41
|
+
var _styles = require('@mui/styles');
|
|
42
42
|
|
|
43
43
|
var _options = require('./chartUtils/options');
|
|
44
44
|
|
|
@@ -20,7 +20,9 @@ var _ramda = require('ramda');
|
|
|
20
20
|
|
|
21
21
|
var R = _interopRequireWildcard(_ramda);
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _makeStyles = require('@mui/styles/makeStyles');
|
|
24
|
+
|
|
25
|
+
var _makeStyles2 = _interopRequireDefault(_makeStyles);
|
|
24
26
|
|
|
25
27
|
var _constants = require('../../../rules/src/constants');
|
|
26
28
|
|
|
@@ -30,7 +32,7 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
|
|
|
30
32
|
|
|
31
33
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
32
34
|
|
|
33
|
-
var useStyles = (0,
|
|
35
|
+
var useStyles = (0, _makeStyles2.default)(function (theme) {
|
|
34
36
|
var legendFont = (0, _utils.getFontFromTheme)(['axisLegend'])(theme);
|
|
35
37
|
return {
|
|
36
38
|
xLegend: legendFont,
|
|
@@ -20,7 +20,7 @@ var _dotstatsuiteD3Charts = require('@sis-cc/dotstatsuite-d3-charts');
|
|
|
20
20
|
|
|
21
21
|
var _src = require('../../../bridge-d3-react/src');
|
|
22
22
|
|
|
23
|
-
var _styles = require('@material
|
|
23
|
+
var _styles = require('@mui/material/styles');
|
|
24
24
|
|
|
25
25
|
var _AxisLegend = require('./AxisLegend');
|
|
26
26
|
|
|
@@ -20,7 +20,9 @@ var _ramda = require('ramda');
|
|
|
20
20
|
|
|
21
21
|
var R = _interopRequireWildcard(_ramda);
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _makeStyles = require('@mui/styles/makeStyles');
|
|
24
|
+
|
|
25
|
+
var _makeStyles2 = _interopRequireDefault(_makeStyles);
|
|
24
26
|
|
|
25
27
|
var _utils = require('../utils');
|
|
26
28
|
|
|
@@ -28,7 +30,7 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
|
|
|
28
30
|
|
|
29
31
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
30
32
|
|
|
31
|
-
var useStyles = (0,
|
|
33
|
+
var useStyles = (0, _makeStyles2.default)(function (theme) {
|
|
32
34
|
return {
|
|
33
35
|
legend: (0, _extends3.default)({}, (0, _utils.getFontFromTheme)(['chartLegend'])(theme), {
|
|
34
36
|
display: 'flex',
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sis-cc/dotstatsuite-components",
|
|
3
3
|
"description": "Set components based on React.",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "18.0.0",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"author": "OECD",
|
|
7
7
|
"license": "MIT",
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"@blueprintjs/core": "^1.22.0",
|
|
16
|
-
"@material
|
|
16
|
+
"@mui/material": "^5.16.5",
|
|
17
|
+
"@mui/styles": "^5.16.5",
|
|
17
18
|
"@sis-cc/dotstatsuite-sdmxjs": "*",
|
|
18
19
|
"@sis-cc/dotstatsuite-visions": "*",
|
|
19
20
|
"react": "^18",
|
|
@@ -23,6 +24,11 @@
|
|
|
23
24
|
"web-component-env": "^2.0.0"
|
|
24
25
|
},
|
|
25
26
|
"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",
|
|
26
32
|
"@react-hook/size": "^2.1.1",
|
|
27
33
|
"@sis-cc/dotstatsuite-d3-charts": "^8.3.0",
|
|
28
34
|
"date-fns": "^1.30.1",
|
|
@@ -34,7 +40,8 @@
|
|
|
34
40
|
"ramda": "^0.26.1"
|
|
35
41
|
},
|
|
36
42
|
"peerDependencies": {
|
|
37
|
-
"@material
|
|
43
|
+
"@mui/icons-material": "^5.16.5",
|
|
44
|
+
"@mui/material": "^5.16.5",
|
|
38
45
|
"@sis-cc/dotstatsuite-sdmxjs": "^8",
|
|
39
46
|
"@sis-cc/dotstatsuite-visions": "^9",
|
|
40
47
|
"react": "^18",
|
package/src/app.js
CHANGED
|
@@ -2,17 +2,19 @@ import React from 'react';
|
|
|
2
2
|
import { createRoot } from 'react-dom/client';
|
|
3
3
|
import ViewerApp from './viewer/src/app';
|
|
4
4
|
import { sisccTheme } from '@sis-cc/dotstatsuite-visions';
|
|
5
|
-
import { ThemeProvider } from '@material
|
|
6
|
-
import { createTheme } from '@material
|
|
5
|
+
import { ThemeProvider, StyledEngineProvider } from '@mui/material/styles';
|
|
6
|
+
import { createTheme } from '@mui/material/styles';
|
|
7
7
|
|
|
8
8
|
const theme = createTheme(sisccTheme({ rtl: 'ltr' }));
|
|
9
9
|
const container = document.getElementById('root');
|
|
10
10
|
const root = createRoot(container);
|
|
11
11
|
|
|
12
12
|
const App = () => (
|
|
13
|
-
<
|
|
14
|
-
<
|
|
15
|
-
|
|
13
|
+
<StyledEngineProvider injectFirst>
|
|
14
|
+
<ThemeProvider theme={theme}>
|
|
15
|
+
<ViewerApp />
|
|
16
|
+
</ThemeProvider>
|
|
17
|
+
</StyledEngineProvider>
|
|
16
18
|
);
|
|
17
19
|
|
|
18
20
|
root.render(<App />);
|
package/src/viewer/src/app.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import { Helmet } from 'react-helmet';
|
|
3
3
|
import { Tab2, Tabs2, Intent, Icon, Tooltip, Position } from '@blueprintjs/core';
|
|
4
|
-
import { ThemeProvider } from '@material
|
|
5
|
-
import { createTheme } from '@material
|
|
4
|
+
import { ThemeProvider, StyledEngineProvider } from '@mui/material/styles';
|
|
5
|
+
import { createTheme } from '@mui/material/styles';
|
|
6
6
|
import { sisccTheme } from '@sis-cc/dotstatsuite-visions';
|
|
7
7
|
import UseCase1 from './app/use-case-1';
|
|
8
8
|
import TableCase from './app/table';
|
|
@@ -100,18 +100,20 @@ export default () => {
|
|
|
100
100
|
*/
|
|
101
101
|
|
|
102
102
|
return (
|
|
103
|
-
<div style={{padding: 10}}>
|
|
104
|
-
<
|
|
105
|
-
<
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
/>
|
|
113
|
-
|
|
114
|
-
</
|
|
103
|
+
<div style={{ padding: 10 }}>
|
|
104
|
+
{/* <StyledEngineProvider injectFirst>
|
|
105
|
+
<ThemeProvider theme={theme}> */}
|
|
106
|
+
<Helmet htmlAttributes={{ dir: isRtl ? 'rtl' : 'ltr' }} />
|
|
107
|
+
<button onClick={() => setRtl(!isRtl)}>{isRtl ? 'left to right' : 'right to left'}</button>
|
|
108
|
+
<Tabs2 renderActiveTabPanelOnly={false}>
|
|
109
|
+
<Tab2
|
|
110
|
+
id="uc1"
|
|
111
|
+
title={<AppTab label="full screen resizable chart" iconName="fullscreen" />}
|
|
112
|
+
panel={<UseCase1 isRtl={isRtl} config={config} style={style} options={options} />}
|
|
113
|
+
/>
|
|
114
|
+
</Tabs2>
|
|
115
|
+
{/* </ThemeProvider>
|
|
116
|
+
</StyledEngineProvider> */}
|
|
115
117
|
</div>
|
|
116
118
|
);
|
|
117
119
|
};
|
package/src/viewer/src/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import * as R from 'ramda';
|
|
|
3
3
|
import cx from 'classnames';
|
|
4
4
|
import useSize from '@react-hook/size';
|
|
5
5
|
import { Loading, NoData, TableHtml5 } from '@sis-cc/dotstatsuite-visions';
|
|
6
|
-
import {
|
|
6
|
+
import { makeStyles, useTheme } from '@mui/styles';
|
|
7
7
|
import getChartOptions from './chartUtils/options';
|
|
8
8
|
import Header from './header';
|
|
9
9
|
import Chart from './chart';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import * as R from 'ramda';
|
|
4
|
-
import
|
|
4
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
5
5
|
import { SCATTER } from '../../../rules/src/constants';
|
|
6
6
|
import { getFontFromTheme } from '../utils';
|
|
7
7
|
|
|
@@ -3,7 +3,7 @@ import * as R from 'ramda';
|
|
|
3
3
|
import numeral from 'numeral';
|
|
4
4
|
import { computeOptions } from '@sis-cc/dotstatsuite-d3-charts';
|
|
5
5
|
import { ChoroplethLegend } from '../../../bridge-d3-react/src';
|
|
6
|
-
import { useTheme } from '@material
|
|
6
|
+
import { useTheme } from '@mui/material/styles';
|
|
7
7
|
import AxisLegend from './AxisLegend';
|
|
8
8
|
import FocusLegend from './FocusLegend';
|
|
9
9
|
import SeriesLegend from './SeriesLegend';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import * as R from 'ramda';
|
|
4
|
-
import
|
|
4
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
5
5
|
import { getFontFromTheme } from '../utils';
|
|
6
6
|
|
|
7
7
|
const useStyles = makeStyles(theme => ({
|